public class JSLPDiscoveryContainer extends AbstractDiscoveryContainerAdapter implements IDiscoveryService
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
static long |
REDISCOVER |
allServiceListeners, serviceListeners, servicesNamespaceName, serviceTypeListenersCONTAINER_ID, CONTAINER_NAME| Constructor and Description |
|---|
JSLPDiscoveryContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addServiceListener(IServiceListener listener)
Add a service listener.
|
void |
addServiceListener(IServiceTypeID type,
IServiceListener listener)
Add a service listener.
|
void |
addServiceTypeListener(IServiceTypeListener listener)
Add a service type listener.
|
void |
connect(ID aTargetID,
IConnectContext connectContext)
Connect to a target remote process or process group.
|
void |
disconnect()
Disconnect.
|
void |
fireServiceDiscovered(IServiceInfo iinfo) |
void |
fireServiceTypeDiscovered(IServiceTypeID serviceTypeID) |
void |
fireServiceUndiscovered(IServiceInfo iinfo) |
ID |
getConnectedID()
Get the target ID that this container instance has connected to.
|
String |
getContainerName() |
IServiceInfo |
getServiceInfo(IServiceID service)
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 aServiceInfo)
Register the given service.
|
void |
unregisterService(IServiceInfo aServiceInfo)
Unregister a previously registered service defined by serviceInfo.
|
clearListeners, dispose, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getConnectNamespace, getID, getListeners, getServiceEvent, getServicesNamespace, removeServiceListener, removeServiceListener, removeServiceTypeListener, unregisterAllServicesaddListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getServicesNamespace, removeServiceListener, removeServiceListener, removeServiceTypeListenergetServicesNamespace, unregisterAllServicespublic static final String NAME
public static long REDISCOVER
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 IContainerpublic void fireServiceDiscovered(IServiceInfo iinfo)
public void fireServiceTypeDiscovered(IServiceTypeID serviceTypeID)
public void fireServiceUndiscovered(IServiceInfo iinfo)
public ID getConnectedID()
IContainergetConnectedID in interface IContainernull
if container not connected.public IServiceInfo getServiceInfo(IServiceID service)
IDiscoveryLocatorgetServiceInfo in interface IDiscoveryLocatorservice - IServiceID of the service to get info about. Must not be
null.null if no
information retrievable.public IServiceTypeID[] getServiceTypes()
IDiscoveryLocatorgetServiceTypes in interface IDiscoveryLocatornull. May be of length 0.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 void registerService(IServiceInfo aServiceInfo)
IDiscoveryAdvertiserregisterService in interface IDiscoveryAdvertiseraServiceInfo - IServiceInfo of the service to be published. Must not be
null.public void unregisterService(IServiceInfo aServiceInfo)
IDiscoveryAdvertiserunregisterService in interface IDiscoveryAdvertiseraServiceInfo - IServiceInfo defining the service to unregister. Must not be
null.public IServiceInfo[] purgeCache()
IDiscoveryLocatorpurgeCache in interface IDiscoveryLocatorpurgeCache in class AbstractDiscoveryContainerAdapterIDiscoveryLocator.purgeCache()public void addServiceListener(IServiceListener listener)
IDiscoveryLocatoraddServiceListener in interface IDiscoveryLocatoraddServiceListener in class AbstractDiscoveryContainerAdapterlistener - IServiceListener to be notified. Must not be null
.public void addServiceListener(IServiceTypeID type, IServiceListener listener)
IDiscoveryLocatoraddServiceListener in interface IDiscoveryLocatoraddServiceListener in class AbstractDiscoveryContainerAdaptertype - String type to listen for. Must not be null. Must
be formatted according to this specific IDiscoveryContainerlistener - IServiceListener to be notified. Must not be null
.public void addServiceTypeListener(IServiceTypeListener listener)
IDiscoveryLocatoraddServiceTypeListener in interface IDiscoveryLocatoraddServiceTypeListener in class AbstractDiscoveryContainerAdapterlistener - the listener to be notified. Must not be null.public String getContainerName()
getContainerName in class AbstractDiscoveryContainerAdapterCopyright © 2004–2020 Eclipse Foundation. All rights reserved.