public class NameLookupImpl extends java.lang.Object implements NameLookup, RemoteExceptionListener
NameLookup
service interface.| Constructor and Description |
|---|
NameLookupImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.naming.Context |
constructContext(java.util.Hashtable properties)
Constructs the InitialContext (this is separated out in a standalone
method so that it may be overridden in a testing subclass).
|
java.lang.Object |
lookup(java.lang.String name,
java.lang.Class expected)
Performs the lookup, returning the object that was found.
|
void |
remoteExceptionDidOccur(RemoteExceptionEvent event)
Sets the InitialContext to null.
|
void |
setCoordinator(RemoteExceptionCoordinator coordinator) |
void |
setInitialFactory(java.lang.String string)
Sets the initial factory used to create the initial JNDI context.
|
void |
setProviderURL(java.lang.String string)
Sets the JNDI provider URL, used to create the initial JNDI context.
|
void |
setURLPackages(java.lang.String string)
Sets the URL packages, used to create the initial JNDI context.
|
public NameLookupImpl()
public java.lang.Object lookup(java.lang.String name, java.lang.Class expected)
NameLookuplookup in interface NameLookupname - the name to lookupexpected - the expected class of the object; the object found must be assignable
to this class (which may be a class or interface)protected javax.naming.Context constructContext(java.util.Hashtable properties) throws javax.naming.NamingException
javax.naming.NamingExceptionpublic void remoteExceptionDidOccur(RemoteExceptionEvent event)
remoteExceptionDidOccur in interface RemoteExceptionListenerpublic void setInitialFactory(java.lang.String string)
java.naming.factory.initial.public void setProviderURL(java.lang.String string)
java.naming.provider.url.public void setURLPackages(java.lang.String string)
java.naming.factory.url.pkgspublic void setCoordinator(RemoteExceptionCoordinator coordinator)