|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.core.AbstractContainer
org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainer
public class ZooDiscoveryContainer
| Nested Class Summary | |
|---|---|
static class |
ZooDiscoveryContainer.FLAVOR
|
| Field Summary | |
|---|---|
protected org.eclipse.ecf.provider.zookeeper.core.internal.Advertiser |
advertiser
|
static java.util.concurrent.ExecutorService |
CACHED_THREAD_POOL
|
protected boolean |
isQuorumPeerReady
|
protected org.eclipse.ecf.provider.zookeeper.core.internal.Localizer |
localizer
|
| Fields inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter |
|---|
allServiceListeners, serviceListeners, servicesNamespaceName, serviceTypeListeners |
| Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryLocator |
|---|
CONTAINER_NAME |
| Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser |
|---|
CONTAINER_NAME |
| Method Summary | |
|---|---|
void |
connect(ID id,
IConnectContext connectContext)
Connect to a target remote process or process group. |
void |
disconnect()
Disconnect. |
void |
dispose()
Dispose this IContainer instance. |
java.util.Collection<IServiceListener> |
getAllServiceListeners()
|
ID |
getConnectedID()
Get the target ID that this container instance has connected to. |
Namespace |
getConnectNamespace()
Get the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls to IContainer.connect(ID, IConnectContext). |
java.lang.String |
getContainerName()
|
java.util.Properties |
getDiscoveryProperties()
|
ID |
getID()
Return the ID for this 'identifiable' object. |
org.apache.zookeeper.server.ZooKeeperServer |
getLocalServer()
|
IServiceInfo |
getServiceInfo(IServiceID serviceID)
Synchronously retrieve info about the service |
java.util.Collection<IServiceListener> |
getServiceListenersForType(IServiceTypeID type)
|
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 |
Namespace |
getServicesNamespace()
Get a Namespace for services associated with this discovery container adapter. |
java.util.Collection<IServiceTypeListener> |
getServiceTypeListeners()
|
IServiceTypeID[] |
getServiceTypes()
Synchronously get service info about all known services of given service type |
static ZooDiscoveryContainer |
getSingleton()
|
void |
init(org.osgi.framework.ServiceReference reference)
|
boolean |
isDisposed()
|
void |
registerService(IServiceInfo serviceInfo)
Register the given service. |
void |
setDiscoveryProperties(java.util.Properties discoveryProperties)
|
void |
shutdown()
|
void |
unregisterAllServices()
Unregister all previously registered service. |
void |
unregisterService(IServiceInfo serviceInfo)
Unregister a previously registered service defined by serviceInfo. |
| Methods inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter |
|---|
addServiceListener, addServiceListener, addServiceTypeListener, clearListeners, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getListeners, purgeCache, removeServiceListener, removeServiceListener, removeServiceTypeListener |
| Methods inherited from class org.eclipse.ecf.core.AbstractContainer |
|---|
addListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Field Detail |
|---|
public static java.util.concurrent.ExecutorService CACHED_THREAD_POOL
protected org.eclipse.ecf.provider.zookeeper.core.internal.Advertiser advertiser
protected org.eclipse.ecf.provider.zookeeper.core.internal.Localizer localizer
protected boolean isQuorumPeerReady
| Method Detail |
|---|
public static ZooDiscoveryContainer getSingleton()
public void init(org.osgi.framework.ServiceReference reference)
public void setDiscoveryProperties(java.util.Properties discoveryProperties)
public java.util.Properties getDiscoveryProperties()
public void shutdown()
public org.apache.zookeeper.server.ZooKeeperServer getLocalServer()
public void connect(ID id,
IConnectContext connectContext)
throws ContainerConnectException
IContainer
id - 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.
public Namespace getConnectNamespace()
IContainerIContainer.connect(ID, IConnectContext).
If this method returns null, then it means that
null is expected as a valid parameter in subsequent calls
to IContainer.connect(ID, IConnectContext). If this method returns a non-null
Namespace, then the targetID parameter in
IContainer.connect(ID, IConnectContext) must be non-null
instance created of the returned Namespace.
getConnectNamespace in interface IContainergetConnectNamespace in class AbstractDiscoveryContainerAdapterIContainer.connect(ID, IConnectContext). If null,
then the targetID instances passed to
IContainer.connect(ID, IConnectContext) may be null.
If not null, then targetID
instances passed to IContainer.connect(ID, IConnectContext) must be
instances of the returned Namespace.public ID getConnectedID()
IContainer
null
if container not connected.public IServiceInfo getServiceInfo(IServiceID serviceID)
IDiscoveryLocator
null if no
information retrievable.public IServiceTypeID[] getServiceTypes()
IDiscoveryLocator
null. May be of length 0.public IServiceInfo[] getServices()
IDiscoveryLocator
null. May be of length 0.public IServiceInfo[] getServices(IServiceTypeID type)
IDiscoveryLocator
null. May be of length 0.public Namespace getServicesNamespace()
IDiscoveryAdvertiser
IServiceID serviceID = ServiceIDFactory.getDefault().createServiceID(
container.getServicesNamespace(), serviceType, serviceName);
getServicesNamespace in interface IDiscoveryAdvertisergetServicesNamespace in interface IDiscoveryLocatorgetServicesNamespace in class AbstractDiscoveryContainerAdapternull
.public void registerService(IServiceInfo serviceInfo)
IDiscoveryAdvertiser
serviceInfo - IServiceInfo of the service to be published. Must not be
null.public void unregisterAllServices()
IDiscoveryAdvertiser
unregisterAllServices in interface IDiscoveryAdvertiserunregisterAllServices in class AbstractDiscoveryContainerAdapterIDiscoveryAdvertiser.unregisterAllServices()public void unregisterService(IServiceInfo serviceInfo)
IDiscoveryAdvertiser
serviceInfo - IServiceInfo defining the service to unregister. Must not be
null.public java.util.Collection<IServiceListener> getAllServiceListeners()
public java.util.Collection<IServiceListener> getServiceListenersForType(IServiceTypeID type)
public java.util.Collection<IServiceTypeListener> getServiceTypeListeners()
public void dispose()
IContainer
dispose in interface IContainerdispose in class AbstractDiscoveryContainerAdapterpublic ID getID()
IIdentifiablenull.
getID in interface IIdentifiablegetID in class AbstractDiscoveryContainerAdapternull.public boolean isDisposed()
public java.lang.String getContainerName()
getContainerName in class AbstractDiscoveryContainerAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||