|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.rmi.naming.remote.discovery.DiscoveryHelper
public class DiscoveryHelper
An instance of this class can be used by applications to listen for the appearance of a) appearing JNDI servers; b) existing JNDI servers; and c) appearing service bindings.
| Field Summary | |
|---|---|
protected EventChannel |
_channel
|
| Constructor Summary | |
|---|---|
DiscoveryHelper(EventChannel ec)
Constructor for DiscoveryHelper. |
|
DiscoveryHelper(java.lang.String domain)
Creates an instance of this class that will listen for new JNDI servers and for the binding of new services on the given domain. |
|
DiscoveryHelper(java.lang.String domain,
java.lang.String mcastAddr,
int mcastPort)
Creates an instance of this class that will listen for new JNDI servers and for the binding of new services on the given domain. |
|
| Method Summary | |
|---|---|
void |
addJndiDiscoListener(JndiDiscoListener listener)
Adds a JNDI discovery listener to this instance. |
void |
addServiceDiscoListener(ServiceDiscoListener listener)
Adds a service discovery listener to this instance. |
void |
close()
Closes this instance - should thereafter be discarded. |
EventChannel |
getChannel()
Returns this instance's event channel. |
protected java.lang.String |
getJndiURI(TCPAddress addr)
|
void |
onAsyncEvent(RemoteEvent evt)
Receives multicast events. |
void |
removeJndiDiscoListener(JndiDiscoListener listener)
Removes the given JNDI discovery listener from this instance. |
void |
removeServiceDiscoListener(ServiceDiscoListener listener)
Removes the given service discovery listener from this instance. |
void |
setContextResolver(ContextResolver res)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EventChannel _channel
| Constructor Detail |
|---|
public DiscoveryHelper(EventChannel ec)
public DiscoveryHelper(java.lang.String domain)
throws java.io.IOException
domain - the name of a domain.
java.io.IOException
public DiscoveryHelper(java.lang.String domain,
java.lang.String mcastAddr,
int mcastPort)
throws java.io.IOException
domain - the name of a domain.mcastAddr - the multicast address to use internally.mcastPort - the multicast port on which to listen.
java.io.IOException| Method Detail |
|---|
public void setContextResolver(ContextResolver res)
res - the ContextResolver that this instance should use
when notified about new JNDI servers.public void addServiceDiscoListener(ServiceDiscoListener listener)
a - ServiceDiscoListener.public void removeServiceDiscoListener(ServiceDiscoListener listener)
a - ServiceDiscoListener.public void addJndiDiscoListener(JndiDiscoListener listener)
a - JndiDiscoListener.public void removeJndiDiscoListener(JndiDiscoListener listener)
a - JndiDiscoListener.public void onAsyncEvent(RemoteEvent evt)
AsyncEventListener
onAsyncEvent in interface AsyncEventListenerevt - a RemoteEvent.AsyncEventListener.onAsyncEvent(RemoteEvent)public void close()
public EventChannel getChannel()
protected java.lang.String getJndiURI(TCPAddress addr)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||