|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jeremie.services.registry.jndi.JRMIRegistryContext
Provides an implementation of a JNDI context for the Jeremie registry.
Field Summary |
Fields inherited from interface javax.naming.Context |
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES |
Constructor Summary | |
JRMIRegistryContext(JRMIRegistryContext ctx)
Creates a Jeremie registry context from an existing context. |
|
JRMIRegistryContext(String host,
int port,
Hashtable env)
Creates a registry context for a Jeremie registry running on a given host and port. |
Method Summary | |
Object |
addToEnvironment(String propName,
Object propVal)
Sets the value of a property in the current context's environment. |
void |
bind(Name name,
Object obj)
Binds the given name with the given object in the current context's registry. |
void |
bind(String name,
Object obj)
Binds the given stringified name with the given object in the current context's registry. |
void |
close()
Closes this registry context. |
Name |
composeName(Name name,
Name prefix)
Composes two names, one being relative to the current context, the other being the name of the current context relative to one of its ancestors. |
String |
composeName(String name,
String prefix)
Composes two stringified names, one being relative to the current context, the other being the stringified name of the current context relative to one of its ancestors. |
Context |
createSubcontext(Name name)
Subcontexts are not supported by Jeremie registry contexts. |
Context |
createSubcontext(String name)
Subcontexts are not supported by Jeremie registry contexts. |
void |
destroySubcontext(Name name)
Subcontexts are not supported by Jeremie registry contexts. |
void |
destroySubcontext(String name)
Subcontexts are not supported by Jeremie registry contexts. |
Hashtable |
getEnvironment()
Returns the environment of the current context. |
String |
getNameInNamespace()
Retrieves the full name of the current context within its own namespace, in other words, the empty string "". |
NameParser |
getNameParser(Name name)
Retrieves the current context's name parser. |
NameParser |
getNameParser(String name)
Retrieves the current context's name parser. |
NamingEnumeration |
list(Name name)
Enumerates the names and the class names of the objects that they are bound to in the current context's registry. |
NamingEnumeration |
list(String name)
Enumerates the names and the class names of the objects that they are bound to in the current context's registry. |
NamingEnumeration |
listBindings(Name name)
Enumerates the names and objects that they are bound to in the current context's registry. |
NamingEnumeration |
listBindings(String name)
Enumerates the names and objects that they are bound to in the current context's registry. |
Object |
lookup(Name name)
Retrieves the object bound to the given name in the current context's registry. |
Object |
lookup(String name)
Retrieves the object bound to the given stringified name in the current context's registry. |
Object |
lookupLink(Name name)
Links are not treated specially by Jeremie registry contexts. |
Object |
lookupLink(String name)
Links are not treated specially by Jeremie registry contexts. |
void |
rebind(Name name,
Object obj)
Rebinds the given name with the given object in the current context's registry. |
void |
rebind(String name,
Object obj)
Rebinds the given stringified name with the given object in the current context's registry. |
Object |
removeFromEnvironment(String propName)
Undefines the value of a property in the current context's environment. |
void |
rename(Name oldname,
Name newname)
Renames an existing bound name in the current context's registry. |
void |
rename(String oldname,
String newname)
Renames an existing stringified bound name in the current context's registry. |
void |
unbind(Name name)
Unbinds the given name from the current context's registry. |
void |
unbind(String name)
Unbinds the given stringified name from the current context's registry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JRMIRegistryContext(JRMIRegistryContext ctx) throws NamingException
ctx
- a given registry context.public JRMIRegistryContext(String host, int port, Hashtable env) throws NamingException
host
- a host on which a Jeremie registry is running;port
- a port on which the registry accepts connections;env
- a hashtable representing the environment.
NamingException
- if something goes wrong.Method Detail |
public Object lookup(Name name) throws NamingException
If the object returned is a Jeremie JNDI reference
, then the javax.naming.spi.NamingManager is called
to retrieve the target object referenced.
lookup
in interface Context
name
- the name of the object to be retrieved. If empty,
then a new instance of this context is returned.
NamingException
- if something goes wrong.public Object lookup(String name) throws NamingException
lookup
in interface Context
name
- the stringified name of the object to be retrieved. If empty,
then a new instance of this context is returned.
NamingException
- if something goes wrong.public void bind(Name name, Object obj) throws NamingException
Before binding, the javax.naming.spi.NamingManager is called to consult any possible state factories concerning the object.
bind
in interface Context
name
- the (non-empty) name to bind;obj
- the object to bind which must be either Remote
,
Reference
, or javax.naming.Referenceable.
NamingException
- if something goes wrong.public void bind(String name, Object obj) throws NamingException
bind
in interface Context
name
- the (non-empty) stringified name to bind;obj
- the object to bind which must be either Remote
,
Reference
, or javax.naming.Referenceable.
NamingException
- if something goes wrong.public void rebind(Name name, Object obj) throws NamingException
Before binding, the javax.naming.spi.NamingManager is called to consult any possible state factories concerning the object.
rebind
in interface Context
name
- the (non-empty) name to rebind;obj
- the object to bind which must be either Remote
,
Reference
, or javax.naming.Referenceable.
NamingException
- if something goes wrong.public void rebind(String name, Object obj) throws NamingException
rebind
in interface Context
name
- the (non-empty) stringified name to rebind;obj
- the object to bind which must be either Remote
,
Reference
, or javax.naming.Referenceable.
NamingException
- if something goes wrong.public void unbind(Name name) throws NamingException
unbind
in interface Context
name
- the name to unbind.
NamingException
- if something goes wrong.public void unbind(String name) throws NamingException
unbind
in interface Context
name
- the name to unbind.
NamingException
- if something goes wrong.public void rename(Name oldname, Name newname) throws NamingException
rename
in interface Context
NamingException
- if something goes wrong.public void rename(String oldname, String newname) throws NamingException
rename
in interface Context
NamingException
- if something goes wrong.public NamingEnumeration list(Name name) throws NamingException
java.lang.Object
.
list
in interface Context
name
- the name of the context to list; must be empty.
NamingException
- if something goes wrong.public NamingEnumeration list(String name) throws NamingException
java.lang.Object
.
list
in interface Context
name
- the stringifed name of the context to list; must be "".
NamingException
- if something goes wrong.public NamingEnumeration listBindings(Name name) throws NamingException
listBindings
in interface Context
name
- the name of the context to list; must be empty.
NamingException
- if something goes wrong.public NamingEnumeration listBindings(String name) throws NamingException
listBindings
in interface Context
name
- the stringified name of the context to list; must be "".
NamingException
- if something goes wrong.public Context createSubcontext(Name name) throws NamingException
createSubcontext
in interface Context
OperationNotSupportedException
NamingException
public Context createSubcontext(String name) throws NamingException
createSubcontext
in interface Context
OperationNotSupportedException
NamingException
public void destroySubcontext(Name name) throws NamingException
destroySubcontext
in interface Context
OperationNotSupportedException
NamingException
public void destroySubcontext(String name) throws NamingException
destroySubcontext
in interface Context
OperationNotSupportedException
NamingException
public Object lookupLink(Name name) throws NamingException
lookupLink
in interface Context
name
- the name of the object to be retrieved. If empty,
then a new instance of this context is returned.
NamingException
- if something goes wrong.lookup(Name)
public Object lookupLink(String name) throws NamingException
lookupLink
in interface Context
name
- the name of the object to be retrieved. If empty,
then a new instance of this context is returned.
NamingException
- if something goes wrong.lookup(String)
public NameParser getNameParser(Name name) throws NamingException
getNameParser
in interface Context
name
- the name of the context from which to get the parser; ignored.
NamingException
- if something goes wrong.public NameParser getNameParser(String name) throws NamingException
getNameParser
in interface Context
name
- the stringified name of the context from which to get the
parser; ignored.
NamingException
- if something goes wrong.public Name composeName(Name name, Name prefix) throws NamingException
composeName
in interface Context
name
- a name relative to this registry context;prefix
- the name of this context relative to one of its ancestors.
NamingException
- if something goes wrong.public String composeName(String name, String prefix) throws NamingException
composeName
in interface Context
name
- a stringified name relative to this registry context;prefix
- the stringified name of this context relative to one of its
ancestors.
NamingException
- if something goes wrong.public Hashtable getEnvironment() throws NamingException
getEnvironment
in interface Context
NamingException
public Object addToEnvironment(String propName, Object propVal) throws NamingException
addToEnvironment
in interface Context
propName
- the name of the property;propVal
- the value of the property.
NamingException
- if something goes wrong.public Object removeFromEnvironment(String propName) throws NamingException
removeFromEnvironment
in interface Context
propName
- the name of the property;
NamingException
- if something goes wrong.public String getNameInNamespace() throws NamingException
getNameInNamespace
in interface Context
NamingException
- if something goes wrong.public void close() throws NamingException
close
in interface Context
NamingException
- if something goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |