Permalink
Browse files
[WFCORE-4392] Migrating CapabilityServiceTarget to new MSC API
- Loading branch information
|
|
@@ -28,8 +28,16 @@ |
|
|
* CapabilityServiceBuilder that are not installed are ignored. |
|
|
* |
|
|
* @author Tomaz Cerar (c) 2017 Red Hat Inc. |
|
|
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a> |
|
|
*/ |
|
|
public interface CapabilityServiceTarget extends ServiceTarget { |
|
|
|
|
|
/** |
|
|
* @deprecated use {@link #addCapability(RuntimeCapability)} method instead |
|
|
*/ |
|
|
@Deprecated |
|
|
<T> CapabilityServiceBuilder<T> addCapability(final RuntimeCapability<?> capability, final Service<T> service) throws IllegalArgumentException; |
|
|
|
|
|
CapabilityServiceBuilder<?> addCapability(final RuntimeCapability<?> capability) throws IllegalArgumentException; |
|
|
|
|
|
} |
|
|
@@ -2125,6 +2125,16 @@ synchronized void done() { |
|
|
} |
|
|
} |
|
|
|
|
|
@Override |
|
|
@SuppressWarnings("unchecked") |
|
|
public CapabilityServiceBuilder<?> addCapability(final RuntimeCapability<?> capability) throws IllegalArgumentException { |
|
|
if (capability.isDynamicallyNamed()){ |
|
|
return new CapabilityServiceBuilderImpl(addService(capability.getCapabilityServiceName(targetAddress)), targetAddress); |
|
|
}else{ |
|
|
return new CapabilityServiceBuilderImpl(addService(capability.getCapabilityServiceName()), targetAddress); |
|
|
} |
|
|
} |
|
|
|
|
|
@Override |
|
|
protected ServiceTarget getDelegate() { |
|
|
checkNotInManagementOperation(); |
|
|
|