|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.ioc.guice.NamingServiceImpl
public class NamingServiceImpl
| Constructor Summary | |
|---|---|
NamingServiceImpl(java.lang.String domain)
|
|
| Method Summary | |
|---|---|
void |
bind(java.lang.String name,
java.lang.Object o)
Binds the given object to the remote Ubik JNDI provider to which this instance corresponds. |
protected DiscoveryHelper |
getDiscoHelper(EventChannel channel)
|
protected DiscoveryHelper |
getDiscoHelper(java.lang.String domain,
java.lang.String mcastHost,
int mcastPort)
|
EventChannel |
getEventChannel()
|
protected javax.naming.InitialContext |
getInitialContext(java.lang.String domain,
java.lang.String host,
int port)
|
java.lang.Object |
lookup(java.lang.String name)
Looks up the object under the given name. |
void |
onJndiDiscovered(javax.naming.Context context)
|
void |
register(ServiceDiscoListener listener)
Registers the given listener with this instance. |
void |
setDomain(java.lang.String domain)
|
NamingServiceImpl |
setJndiHost(java.lang.String host)
|
NamingServiceImpl |
setJndiPort(int port)
|
void |
setMulticastAddress(java.lang.String addr)
|
void |
setMulticastPort(int port)
|
void |
shutdown()
Shuts down this instance. |
void |
unregister(ServiceDiscoListener listener)
Unregisters the given listener from this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NamingServiceImpl(java.lang.String domain)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public NamingServiceImpl setJndiHost(java.lang.String host)
host - the host of the remote Ubik JNDI server.public NamingServiceImpl setJndiPort(int port)
port - the port of the remote Ubik JNDI server.public void setDomain(java.lang.String domain)
domain - the domain of the remote Ubik JNDI server.public void setMulticastAddress(java.lang.String addr)
addr - the multicast address to use for discovering remote
JNDI servers.public void setMulticastPort(int port)
port - the multicast port to use for discovering remote
JNDI servers.public EventChannel getEventChannel()
public void bind(java.lang.String name,
java.lang.Object o)
throws javax.naming.NamingException
NamingService
bind in interface NamingServicename - the name under which to bind the object.o - the object to bind.
javax.naming.NamingException
public java.lang.Object lookup(java.lang.String name)
throws javax.naming.NamingException,
javax.naming.NameNotFoundException
NamingService
lookup in interface NamingServicename - the name of the remote object to lookup.
javax.naming.NamingException
javax.naming.NameNotFoundExceptionpublic void register(ServiceDiscoListener listener)
NamingService
register in interface NamingServicelistener - a ServiceDiscoListener.public void unregister(ServiceDiscoListener listener)
NamingService
unregister in interface NamingServicelistener - a ServiceDiscoListener.public void shutdown()
NamingService
shutdown in interface NamingServicepublic void onJndiDiscovered(javax.naming.Context context)
onJndiDiscovered in interface JndiDiscoListener
protected DiscoveryHelper getDiscoHelper(java.lang.String domain,
java.lang.String mcastHost,
int mcastPort)
throws java.io.IOException
java.io.IOException
protected DiscoveryHelper getDiscoHelper(EventChannel channel)
throws java.io.IOException
java.io.IOException
protected javax.naming.InitialContext getInitialContext(java.lang.String domain,
java.lang.String host,
int port)
throws javax.naming.NamingException
javax.naming.NamingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||