Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.CORBA.NamingService.NameTransformer
gnu.javax.naming.giop.CorbalocParser
gnu.javax.naming.giop.GiopNamingServiceURLContext
Context.BATCHSIZE
property to determine, how many bindings should
be returned at once (the process is transparend)
Field Summary | |
int |
|
int |
|
Fields inherited from class gnu.javax.naming.giop.CorbalocParser | |
DEFAULT_NAME , DEFAULT_PORT , IIOP , RIR , pxCORBALOC , pxCORBANAME , pxFILE , pxFTP , pxHTTP , pxIOR |
Fields inherited from class gnu.CORBA.NamingService.NameTransformer | |
ESCAPE |
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 | |
|
Method Summary | |
Object |
|
void | |
void | |
void |
|
String |
|
Name |
|
Context |
|
Context |
|
void |
|
void |
|
int |
|
Hashtable<K,V> |
|
String |
|
NameParser |
|
NameParser |
|
NamingContextExt |
|
NamingEnumeration<T> | |
NamingEnumeration<T> | |
NamingEnumeration<T> |
|
NamingEnumeration<T> |
|
Object | |
Object | |
Object |
|
Object |
|
void | |
void | |
Object |
|
void | |
void | |
String[] | |
NameComponent[] | |
void | |
void |
Methods inherited from class gnu.javax.naming.giop.CorbalocParser | |
corbaloc |
Methods inherited from class gnu.CORBA.NamingService.NameTransformer | |
main , toName , toString |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public int DEFAULT_BATCH_SIZE
This number of bindings will be requested from the naming server at once, while the subsequent bindings will be requested via binding iterator one by one. UseContext.BATCHSIZE
to override the value of this constant.
public GiopNamingServiceURLContext(Hashtable<K,V> props, GiopNamingServiceFactory aFactory, ORB anOrb)
Creates a new naming context that uses naming service, represented by the given CORBA object.
- Parameters:
props
- the environment table.aFactory
- parent factory. This reference is used during cleanup.anOrb
- the associated ORB. This reference is used during cleanup.
public Object addToEnvironment(String key, Object value) throws NamingException
Add new environment property to the environment of this context. Both name and value of the new property must not be null. If the property is already defined, is current value is replaced by the propVal.
- Specified by:
- addToEnvironment in interface Context
- Parameters:
key
- the name of the new propertyvalue
- the value of the new property
- Returns:
- the previous value of this property or null if the property has not been previously defined
- Throws:
NamingException
-
public void bind(String name, Object obj) throws NamingException
Give the specified name for the specified object. The passed name must not be already bound to some other object.
- Parameters:
name
- the name that will be given to the object (in the scope of this context).obj
- the object being named.
- Throws:
NamingException
- if the naming operation has failed due other reasons.
public void bind(Name name, Object obj) throws NamingException
Give the specified name for the specified object. The passed name must not be already bound to some other object. The components of the name are mapped into the components of the CORBA name.
- Parameters:
name
- the name that will be given to the object (in the scope of this context).obj
- the object being named.
- Throws:
NamingException
- if the naming operation has failed due other reasons.
public void close() throws NamingException
Releases all resources, associated with this context. The close() method can be called several times, but after it has been once invoked, it is not allowed to call any other method of this context. This method destroys the ORB, if we have one.
- Throws:
NamingException
-
public String composeName(String name1, String name2) throws NamingException
Not supported
- Specified by:
- composeName in interface Context
public Name composeName(Name name, Name prefix) throws NamingException
Not supported.
- Specified by:
- composeName in interface Context
public Context createSubcontext(String subContext) throws NamingException
Creates the new naming subcontext and binds it to the current (this) context. The returned object will wrap around the newly created CORBA subcontext
- Specified by:
- createSubcontext in interface Context
- Parameters:
subContext
- the name of the new context being created
- Returns:
- the newly created context, bound to the instance of the context on that the method has been called
- Throws:
NamingException
-
public Context createSubcontext(Name subContext) throws NamingException
Creates the new naming subcontext and binds it to the current (this) context. The returned object will wrap around the newly created CORBA subcontext
- Specified by:
- createSubcontext in interface Context
- Parameters:
subContext
- the name of the new context being created
- Returns:
- the newly created context, bound to the instance of the context on that the method has been called
- Throws:
NamingException
-
public void destroySubcontext(String subContext) throws NamingException
Removes the naming subcontext from this naming context. Returns without action if such subcontext does not exist. The context being destroyed must be empty.
- Specified by:
- destroySubcontext in interface Context
- Parameters:
subContext
- the name of the subcontext beig removed.
- Throws:
NamingException
-
public void destroySubcontext(Name subContext) throws NamingException
Removes the naming subcontext from this naming context. Returns without action if such subcontext does not exist. The context being destroyed must be empty.
- Specified by:
- destroySubcontext in interface Context
- Parameters:
subContext
- the name of the subcontext beig removed.
- Throws:
NamingException
-
public int getBatchSize()
Get the batch size from the environment properties. The batch size is used for listing operations.
- Returns:
- the batch size, or some default value if not specified.
public Hashtable<K,V> getEnvironment() throws NamingException
Returns the environment, associated with this naming context. The returned table should never be modified by the caller. UseaddToEnvironment(String,Object)
andremoveFromEnvironment(String)
to modify the environement, if needed.
- Specified by:
- getEnvironment in interface Context
- Returns:
- the table, representing the environment of this context
- Throws:
NamingException
-
public String getNameInNamespace() throws NamingException
Returs the empty string.
- Specified by:
- getNameInNamespace in interface Context
public NameParser getNameParser(String name) throws NamingException
Not supported.
- Specified by:
- getNameParser in interface Context
public NameParser getNameParser(Name name) throws NamingException
Not supported.
- Specified by:
- getNameParser in interface Context
public NamingEnumeration<T> list(String name) throws NamingException
Creates and returns the enumeration over the name bindings that are present the given subcontext. The enumeration elements have the type ofNameClassPair
, providing also information about the class of the bound object. The behaviour in the case if the bindings are added or removed later is not defined. The contents of the subcontexts are not included.
- Parameters:
name
- the name of the subcontext
- Returns:
- the enumeration over the names, known for the given subcontext.
- Throws:
NamingException
-
public NamingEnumeration<T> list(Name name) throws NamingException
Creates and returns the enumeration over the name bindings that are present the given subcontext. The enumeration elements have the type ofNameClassPair
, providing also information about the class of the bound object. The behaviour in the case if the bindings are added or removed later is not defined. The contents of the subcontexts are not included.
- Parameters:
name
- the name of the subcontext
- Returns:
- the enumeration over the names, known for the given subcontext.
- Throws:
NamingException
-
public NamingEnumeration<T> listBindings(String name) throws NamingException
Creates and returns the enumeration over the name - object bindings that are present the given subcontext. The enumeration elements have the type ofBinding
, providing also information about the class of the bound object. The behaviour in the case if the bindings are added or removed later is not defined. The contents of the subcontexts are not included.
- Specified by:
- listBindings in interface Context
- Parameters:
name
- the name of the subcontext
- Returns:
- the enumeration over the names, known for the given subcontext.
- Throws:
NamingException
-
public NamingEnumeration<T> listBindings(Name name) throws NamingException
Creates and returns the enumeration over the name - object bindings that are present the given subcontext. The enumeration elements have the type ofBinding
, providing also information about the class of the bound object. The behaviour in the case if the bindings are added or removed later is not defined. The contents of the subcontexts are not included.
- Specified by:
- listBindings in interface Context
- Parameters:
name
- the name of the subcontext
- Returns:
- the enumeration over the names, known for the given subcontext.
- Throws:
NamingException
-
public Object lookup(String name) throws NamingException
Gets the previously named object by name. If the passed name is empty, the method should return a cloned instance of this naming context.
- Parameters:
name
- the name of the object being searched in this context
- Returns:
- the named object
- Throws:
NamingException
- if the naming fails.
public Object lookup(Name name) throws NamingException
Gets the previously named object by name. If the passed name is empty, the method should return a cloned instance of this naming context.
- Parameters:
name
- the name of the object being searched in this context
- Returns:
- the named object
public Object lookupLink(String name) throws NamingException
Not supported.
- Specified by:
- lookupLink in interface Context
public Object lookupLink(Name name) throws NamingException
Not supported.
- Specified by:
- lookupLink in interface Context
public void rebind(String name, Object obj) throws NamingException
Give the specified name for the specified object. Unlike bind, this method silently replaces the existing binding for this name, if one exists.
- Parameters:
name
- the name that will be given to the object (in the scope of this context).obj
- the object being named.
- Throws:
NamingException
- if the naming operation has failed due other reasons.
public void rebind(Name name, Object obj) throws NamingException
Give the specified name for the specified object. Unlike bind, this method silently replaces the existing binding for this name, if one exists.
- Parameters:
name
- the name that will be given to the object (in the scope of this context).obj
- the object being named.
- Throws:
NamingException
- if the naming operation has failed due other reasons.
public Object removeFromEnvironment(String propName) throws NamingException
Removes the property with the given name from the environment. Returns without action if this property is not defined.
- Specified by:
- removeFromEnvironment in interface Context
- Parameters:
propName
- the name of the property being removed.
- Returns:
- the value of the property that has been removed or null if the property was not defined.
- Throws:
NamingException
-
public void rename(String oldName, String newName) throws NamingException
Renames the existing binding, removing the existing and giving the new name for the same object.
- Parameters:
oldName
- the existing name of the known objectnewName
- the new name of the same object
- Throws:
NamingException
- if the naming operation has failed due other reasons.
public void rename(Name oldName, Name newName) throws NamingException
Renames the existing binding, removing the existing and giving the new name for the same object.
- Parameters:
oldName
- the existing name of the known objectnewName
- the new name of the same object
- Throws:
NamingException
- if the naming operation has failed due other reasons.
public String[] split(String corbaloc) throws InvalidNameException
Split the corbaname name into the address of the naming service (first part) and the name of the object in the naming service (second part)
public NameComponent[] toGiop(Name name) throws InvalidName
Convert theName
into array of the name components, required to the CORBA naming service. First the string representation is obtained, then it is converted using parsing rules of the CORBA name.
- Parameters:
name
- then name to convert
- Returns:
- the converted array of components.
public void unbind(String name) throws NamingException
Removes the name - object mapping from the current context. This method returns without action if the name is not bound to an object in the terminal context, but throwsNameNotFoundException
if one of the intermadiate contexts does not exist.
- Parameters:
name
- the name to be removed
- Throws:
NamingException
- if the naming operation has failed due other reasons.
public void unbind(Name name) throws NamingException
Removes the name - object mapping from the current context. This method returns without action if the name is not bound to an object in the terminal context, but throwsNameNotFoundException
if one of the intermadiate contexts does not exist.
- Parameters:
name
- the name to be removed
- Throws:
NamingException
- if the naming operation has failed due other reasons.