Package com.sun.enterprise.naming.impl
Class SerialContext
java.lang.Object
com.sun.enterprise.naming.impl.SerialContext
- All Implemented Interfaces:
Context
This context provides access to the app server naming service. This
is the default Context for GlassFish. Lookups of unqualified names (i.e.
names not starting with "java:", "corbaname:" etc) are serviced by
SerialContext. The namespace is implemented in the
SerialContextProviderImpl object, which is accessed directly in the
case that the client is collocated with the naming service impl or
remotely via RMI-IIOP if not collocated.
NOT THREAD SAFE: mutable instance variables
-
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
ConstructorsConstructorDescriptionSerialContext(String name, Hashtable<Object, Object> environment, org.glassfish.hk2.api.ServiceLocator h) This constructor takes the component id as an argument.SerialContext(Hashtable<Object, Object> env, org.glassfish.hk2.api.ServiceLocator services) This constructor uses an empty string as a name. -
Method Summary
Modifier and TypeMethodDescriptionaddToEnvironment(String propName, Object propVal) Add to the environment for the current context.voidBind the object to the specified name.voidBind the object to the specified name.voidclose()Set the environment for the current context to null when close is called.composeName(String name, String prefix) composeName(Name name, Name prefix) createSubcontext(String name) Create the specified subcontext.createSubcontext(Name name) Create the specified subcontext.voiddestroySubcontext(String name) Destroy the specified subcontext.voiddestroySubcontext(Name name) Destroy the specified subcontext.Return the environment for the current context.getNameParser(String name) Allow access to the name parser object.getNameParser(Name name) Allow access to the name parser object.List the contents of the specified context.List the contents of the specified context.listBindings(String name) List the bindings in the specified context.listBindings(Name name) List the bindings in the specified context.Lookup the specified name in the context.Lookup the specifed name in the context.lookupLink(String name) Links are not treated specially.lookupLink(Name name) Links are not treated specially.voidRebind the object to the specified name.voidRebind the object to the specified name.removeFromEnvironment(String propName) Remove from the environment for the current context.voidRename the bound object.voidRename the bound object.toString()voidUnbind the object with the specified name.voidUnbind the object with the specified name.
-
Constructor Details
-
SerialContext
public SerialContext(Hashtable<Object, Object> env, org.glassfish.hk2.api.ServiceLocator services) throws NamingExceptionThis constructor uses an empty string as a name. Initializes the object reference to the remote provider object.- Throws:
NamingException
-
SerialContext
public SerialContext(String name, Hashtable<Object, Object> environment, org.glassfish.hk2.api.ServiceLocator h) This constructor takes the component id as an argument. All name arguments to operations are prepended by the component id. Initializes the object reference to the remote provider object.
-
-
Method Details
-
getNameInNamespace
- Specified by:
getNameInNamespacein interfaceContext- Throws:
NamingException
-
lookup
Lookup the specified name in the context. Returns the resolved object.- Specified by:
lookupin interfaceContext- Returns:
- the resolved object.
- Throws:
NamingException- if there is a naming exception.
-
lookup
Lookup the specifed name in the context. Returns the resolved object.- Specified by:
lookupin interfaceContext- Returns:
- the resolved object.
- Throws:
NamingException- if there is a naming exception.
-
bind
Bind the object to the specified name.- Specified by:
bindin interfaceContext- Parameters:
name- name that the object is being bound to.obj- object that is being bound.- Throws:
NamingException- if there is a naming exception.
-
bind
Bind the object to the specified name.- Specified by:
bindin interfaceContext- Parameters:
name- name that the object is being bound to.obj- object that is being bound.- Throws:
NamingException- if there is a naming exception.
-
rebind
Rebind the object to the specified name.- Specified by:
rebindin interfaceContext- Parameters:
name- name that the object is being bound to.obj- object that is being bound.- Throws:
NamingException- if there is a naming exception.
-
rebind
Rebind the object to the specified name.- Specified by:
rebindin interfaceContext- Parameters:
name- name that the object is being bound to.obj- object that is being bound.- Throws:
NamingException- if there is a naming exception.
-
unbind
Unbind the object with the specified name.- Specified by:
unbindin interfaceContext- Parameters:
name- that is being unbound.- Throws:
NamingException- if there is a naming exception.
-
unbind
Unbind the object with the specified name.- Specified by:
unbindin interfaceContext- Parameters:
name- name that is being unbound.- Throws:
NamingException- if there is a naming exception.
-
rename
Rename the bound object.- Specified by:
renamein interfaceContext- Parameters:
oldname- old name that the object is bound as.newname- new name that the object will be bound as.- Throws:
NamingException- if there is a naming exception.
-
rename
Rename the bound object.- Specified by:
renamein interfaceContext- Parameters:
oldname- old name that the object is bound as.newname- new name that the object will be bound as.- Throws:
NamingException- if there is a naming exception.
-
list
List the contents of the specified context.- Specified by:
listin interfaceContext- Parameters:
name- context name.- Returns:
- an enumeration of the contents.
- Throws:
NamingException- if there is a naming exception.
-
list
List the contents of the specified context.- Specified by:
listin interfaceContext- Parameters:
name- context name.- Returns:
- an enumeration of the contents.
- Throws:
NamingException- if there is a naming exception.
-
listBindings
List the bindings in the specified context.- Specified by:
listBindingsin interfaceContext- Parameters:
name- context name.- Returns:
- an enumeration of the bindings.
- Throws:
NamingException- if there is a naming exception.
-
listBindings
List the bindings in the specified context.- Specified by:
listBindingsin interfaceContext- Parameters:
name- context name.- Returns:
- an enumeration of the bindings.
- Throws:
NamingException- if there is a naming exception.
-
destroySubcontext
Destroy the specified subcontext.- Specified by:
destroySubcontextin interfaceContext- Parameters:
name- name of the subcontext.- Throws:
NamingException- if there is a naming exception.
-
destroySubcontext
Destroy the specified subcontext.- Specified by:
destroySubcontextin interfaceContext- Parameters:
name- name of the subcontext.- Throws:
NamingException- if there is a naming exception.
-
createSubcontext
Create the specified subcontext.- Specified by:
createSubcontextin interfaceContext- Parameters:
name- name of the subcontext.- Returns:
- the created subcontext.
- Throws:
NamingException- if there is a naming exception.
-
createSubcontext
Create the specified subcontext.- Specified by:
createSubcontextin interfaceContext- Parameters:
name- name of the subcontext.- Returns:
- the created subcontext.
- Throws:
NamingException- if there is a naming exception.
-
lookupLink
Links are not treated specially.- Specified by:
lookupLinkin interfaceContext- Parameters:
name- name of the link.- Returns:
- the resolved object.
- Throws:
NamingException- if there is a naming exception.
-
lookupLink
Links are not treated specially.- Specified by:
lookupLinkin interfaceContext- Parameters:
name- name of the link.- Returns:
- the resolved object.
- Throws:
NamingException- if there is a naming exception.
-
getNameParser
Allow access to the name parser object.- Specified by:
getNameParserin interfaceContext- Parameters:
name- JNDI name, is ignored since there is only one Name Parser object.- Returns:
- NameParser object
- Throws:
NamingException
-
getNameParser
Allow access to the name parser object.- Specified by:
getNameParserin interfaceContext- Parameters:
name- JNDI name, is ignored since there is only one Name Parser object.- Returns:
- NameParser object
- Throws:
NamingException
-
composeName
- Specified by:
composeNamein interfaceContext- Throws:
NamingException
-
composeName
- Specified by:
composeNamein interfaceContext- Throws:
NamingException
-
addToEnvironment
Add to the environment for the current context.- Specified by:
addToEnvironmentin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
removeFromEnvironment
Remove from the environment for the current context.- Specified by:
removeFromEnvironmentin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
getEnvironment
Return the environment for the current context.- Specified by:
getEnvironmentin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
toString
-
close
Set the environment for the current context to null when close is called.- Specified by:
closein interfaceContext- Throws:
NamingException- if there is a naming exception.
-