public class CompositeDiscoveryContainer extends AbstractDiscoveryContainerAdapter implements IDiscoveryService
| Modifier and Type | Class and Description |
|---|---|
protected class |
CompositeDiscoveryContainer.CompositeContainerServiceListener |
protected class |
CompositeDiscoveryContainer.CompositeContainerServiceTypeListener |
static class |
CompositeDiscoveryContainer.CompositeServiceInfoWrapper |
| Modifier and Type | Field and Description |
|---|---|
protected CompositeDiscoveryContainer.CompositeContainerServiceListener |
ccsl |
protected CompositeDiscoveryContainer.CompositeContainerServiceTypeListener |
ccstl |
protected Collection |
containers |
protected static String |
METHODS_CATCHING |
protected static String |
METHODS_TRACING |
static String |
NAME |
protected Set |
registeredServices
History of services registered with this IDCA
Used on newly added IDCAs
|
allServiceListeners, serviceListeners, servicesNamespaceName, serviceTypeListenersCONTAINER_ID, CONTAINER_NAME| Constructor and Description |
|---|
CompositeDiscoveryContainer(Collection containers) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addContainer(Object object) |
void |
connect(ID aTargetID,
IConnectContext connectContext)
Connect to a target remote process or process group.
|
void |
disconnect()
Disconnect.
|
void |
dispose()
Dispose this IContainer instance.
|
ID |
getConnectedID()
Get the target ID that this container instance has connected to.
|
String |
getContainerName() |
Collection |
getDiscoveryContainers() |
protected IServiceEvent |
getServiceEvent(IServiceInfo iServiceInfo,
ID id) |
IServiceInfo |
getServiceInfo(IServiceID aService)
Synchronously retrieve info about the service
|
IServiceInfo[] |
getServices()
Synchronously get service info about all known services
|
IServiceInfo[] |
getServices(IServiceTypeID type)
Synchronously get service info about all known services of given service
type
|
IServiceTypeID[] |
getServiceTypes()
Synchronously get service info about all known services of given service
type
|
IServiceInfo[] |
purgeCache()
Purges the underlying IServiceInfo cache if available in the current
provider
|
void |
registerService(IServiceInfo serviceInfo)
Register the given service.
|
boolean |
removeContainer(Object object) |
void |
unregisterAllServices()
Unregister all previously registered service.
|
void |
unregisterService(IServiceInfo serviceInfo)
Unregister a previously registered service defined by serviceInfo.
|
addServiceListener, addServiceListener, addServiceTypeListener, clearListeners, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getConnectNamespace, getID, getListeners, getServicesNamespace, removeServiceListener, removeServiceListener, removeServiceTypeListeneraddListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddServiceListener, addServiceListener, addServiceTypeListener, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getServicesNamespace, removeServiceListener, removeServiceListener, removeServiceTypeListenergetServicesNamespacepublic static final String NAME
protected static final String METHODS_CATCHING
protected static final String METHODS_TRACING
protected final CompositeDiscoveryContainer.CompositeContainerServiceListener ccsl
protected final CompositeDiscoveryContainer.CompositeContainerServiceTypeListener ccstl
protected Set registeredServices
protected final Collection containers
public CompositeDiscoveryContainer(Collection containers)
containers - public void connect(ID aTargetID, IConnectContext connectContext) throws ContainerConnectException
IContainerconnect in interface IContaineraTargetID - the ID of the remote server or group to connect to. See
IContainer.getConnectNamespace() for a explanation of the
constraints upon this parameter.connectContext - any required context to allow this container to authenticate.
May be null if underlying provider does not
have any authentication requirements for connection.ContainerConnectException - thrown if communication cannot be established with remote
service. Causes can include network connection failure,
authentication failure, server error, or if container is
already connected.public void disconnect()
IContainernull.disconnect in interface IContainerprotected IServiceEvent getServiceEvent(IServiceInfo iServiceInfo, ID id)
getServiceEvent in class AbstractDiscoveryContainerAdapteriServiceInfo - service infoid - idpublic void dispose()
IContainerdispose in interface IContainerdispose in class AbstractDiscoveryContainerAdapterpublic ID getConnectedID()
IContainergetConnectedID in interface IContainernull
if container not connected.public IServiceInfo getServiceInfo(IServiceID aService)
IDiscoveryLocatorgetServiceInfo in interface IDiscoveryLocatoraService - IServiceID of the service to get info about. Must not be
null.null if no
information retrievable.public IServiceInfo[] getServices()
IDiscoveryLocatorgetServices in interface IDiscoveryLocatornull. May be of length 0.public IServiceInfo[] getServices(IServiceTypeID type)
IDiscoveryLocatorgetServices in interface IDiscoveryLocatortype - IServiceTypeID defining the type of service we are interested
in getting service info about. Must not be nullnull. May be of length 0.public IServiceTypeID[] getServiceTypes()
IDiscoveryLocatorgetServiceTypes in interface IDiscoveryLocatornull. May be of length 0.public void registerService(IServiceInfo serviceInfo)
IDiscoveryAdvertiserregisterService in interface IDiscoveryAdvertiserserviceInfo - IServiceInfo of the service to be published. Must not be
null.public void unregisterService(IServiceInfo serviceInfo)
IDiscoveryAdvertiserunregisterService in interface IDiscoveryAdvertiserserviceInfo - IServiceInfo defining the service to unregister. Must not be
null.public void unregisterAllServices()
IDiscoveryAdvertiserunregisterAllServices in interface IDiscoveryAdvertiserunregisterAllServices in class AbstractDiscoveryContainerAdapterIDiscoveryAdvertiser.unregisterAllServices()public IServiceInfo[] purgeCache()
IDiscoveryLocatorpurgeCache in interface IDiscoveryLocatorpurgeCache in class AbstractDiscoveryContainerAdapterIDiscoveryLocator.purgeCache()public boolean addContainer(Object object)
object - List.add(java.lang.Object)public boolean removeContainer(Object object)
object - List.remove(java.lang.Object)public Collection getDiscoveryContainers()
public String getContainerName()
getContainerName in class AbstractDiscoveryContainerAdapterCopyright © 2017. All rights reserved.