Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.mjh.switchrmi.jndi
Class JndiContextImpl  view JndiContextImpl download JndiContextImpl.java

java.lang.Object
  extended bycom.mjh.switchrmi.jndi.JndiContextImpl
All Implemented Interfaces:
javax.naming.Context

public class JndiContextImpl
extends java.lang.Object
implements javax.naming.Context


Nested Class Summary
(package private) static class JndiContextImpl.NameParserImpl
           
 
Field Summary
private  java.util.Map bindings
           
private  java.util.Map env
           
private static org.apache.log4j.Logger log
           
private  javax.naming.Name name
           
private  javax.naming.Context parent
           
private static javax.naming.NameParser parser
           
 
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
JndiContextImpl()
           
JndiContextImpl(javax.naming.Name name)
           
 
Method Summary
protected  java.lang.Object _lookup(javax.naming.Name name)
           
protected  java.lang.Object _lookup(java.lang.String name)
           
private  JndiContextImpl _lookupParent(javax.naming.Name name)
           
 java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propVal)
           
 void bind(javax.naming.Name name, java.lang.Object obj)
           
 void bind(java.lang.String name, java.lang.Object obj)
           
 java.lang.Object clone()
          This method may be called to create a new copy of the Object.
 void close()
           
 javax.naming.Name composeName(javax.naming.Name oldName, javax.naming.Name newName)
           
 java.lang.String composeName(java.lang.String oldName, java.lang.String newName)
           
private  java.lang.Object convertObject(java.lang.Object object, javax.naming.Name name, javax.naming.Context ctx)
           
 javax.naming.Context createSubcontext(javax.naming.Name name)
           
 javax.naming.Context createSubcontext(java.lang.String name)
           
 void destroySubcontext(javax.naming.Name name)
           
 void destroySubcontext(java.lang.String name)
           
private  java.lang.Object get(javax.naming.Name name)
           
private  java.lang.Object get(java.lang.String string)
           
 java.util.Hashtable getEnvironment()
           
 java.lang.String getNameInNamespace()
           
 javax.naming.NameParser getNameParser(javax.naming.Name name)
           
 javax.naming.NameParser getNameParser(java.lang.String name)
           
 javax.naming.Context getRootContext()
           
 javax.naming.NamingEnumeration list(javax.naming.Name name)
           
 javax.naming.NamingEnumeration list(java.lang.String name)
           
 javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
           
 javax.naming.NamingEnumeration listBindings(java.lang.String name)
           
 java.lang.Object lookup(javax.naming.Name name)
           
 java.lang.Object lookup(java.lang.String name)
           
 java.lang.Object lookupLink(javax.naming.Name name)
           
 java.lang.Object lookupLink(java.lang.String name)
           
private  void put(javax.naming.Name name, java.lang.Object object)
           
private  void put(java.lang.String string, java.lang.Object object)
           
 void rebind(javax.naming.Name name, java.lang.Object obj)
           
 void rebind(java.lang.String name, java.lang.Object obj)
           
private  void remove(javax.naming.Name name)
           
private  void remove(java.lang.String string)
           
 java.lang.Object removeFromEnvironment(java.lang.String propName)
           
 void rename(javax.naming.Name oldName, javax.naming.Name newName)
           
 void rename(java.lang.String oldName, java.lang.String newName)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 void unbind(javax.naming.Name name)
           
 void unbind(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Logger log

parser

private static javax.naming.NameParser parser

name

private javax.naming.Name name

parent

private javax.naming.Context parent

env

private java.util.Map env

bindings

private java.util.Map bindings
Constructor Detail

JndiContextImpl

public JndiContextImpl()

JndiContextImpl

public JndiContextImpl(javax.naming.Name name)
Method Detail

clone

public java.lang.Object clone()
Description copied from class: java.lang.Object
This method may be called to create a new copy of the Object. The typical behavior is as follows:
  • o == o.clone() is false
  • o.getClass() == o.clone().getClass() is true
  • o.equals(o) is true

However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>Object.equals(Object) 55 .

If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.

Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.

All array types implement Cloneable, and override this method as follows (it should never fail):

 public Object clone()
 {
   try
     {
       super.clone();
     }
   catch (CloneNotSupportedException e)
     {
       throw new InternalError(e.getMessage());
     }
 }
 


addToEnvironment

public java.lang.Object addToEnvironment(java.lang.String propName,
                                         java.lang.Object propVal)
Specified by:
addToEnvironment in interface javax.naming.Context

removeFromEnvironment

public java.lang.Object removeFromEnvironment(java.lang.String propName)
Specified by:
removeFromEnvironment in interface javax.naming.Context

getEnvironment

public java.util.Hashtable getEnvironment()
                                   throws javax.naming.NamingException
Specified by:
getEnvironment in interface javax.naming.Context

getRootContext

public javax.naming.Context getRootContext()

getNameInNamespace

public java.lang.String getNameInNamespace()
                                    throws javax.naming.NamingException
Specified by:
getNameInNamespace in interface javax.naming.Context

bind

public void bind(javax.naming.Name name,
                 java.lang.Object obj)
          throws javax.naming.NamingException
Specified by:
bind in interface javax.naming.Context

bind

public void bind(java.lang.String name,
                 java.lang.Object obj)
          throws javax.naming.NamingException
Specified by:
bind in interface javax.naming.Context

createSubcontext

public javax.naming.Context createSubcontext(javax.naming.Name name)
                                      throws javax.naming.NamingException
Specified by:
createSubcontext in interface javax.naming.Context

createSubcontext

public javax.naming.Context createSubcontext(java.lang.String name)
                                      throws javax.naming.NamingException
Specified by:
createSubcontext in interface javax.naming.Context

destroySubcontext

public void destroySubcontext(javax.naming.Name name)
                       throws javax.naming.NamingException
Specified by:
destroySubcontext in interface javax.naming.Context

destroySubcontext

public void destroySubcontext(java.lang.String name)
                       throws javax.naming.NamingException
Specified by:
destroySubcontext in interface javax.naming.Context

_lookup

protected java.lang.Object _lookup(java.lang.String name)
                            throws javax.naming.NamingException

_lookup

protected java.lang.Object _lookup(javax.naming.Name name)
                            throws javax.naming.NamingException

_lookupParent

private JndiContextImpl _lookupParent(javax.naming.Name name)
                               throws javax.naming.NamingException

lookup

public java.lang.Object lookup(javax.naming.Name name)
                        throws javax.naming.NamingException
Specified by:
lookup in interface javax.naming.Context

lookup

public java.lang.Object lookup(java.lang.String name)
                        throws javax.naming.NamingException
Specified by:
lookup in interface javax.naming.Context

convertObject

private java.lang.Object convertObject(java.lang.Object object,
                                       javax.naming.Name name,
                                       javax.naming.Context ctx)
                                throws javax.naming.NamingException

get

private java.lang.Object get(java.lang.String string)

get

private java.lang.Object get(javax.naming.Name name)

put

private void put(java.lang.String string,
                 java.lang.Object object)

put

private void put(javax.naming.Name name,
                 java.lang.Object object)

remove

private void remove(java.lang.String string)

remove

private void remove(javax.naming.Name name)

lookupLink

public java.lang.Object lookupLink(javax.naming.Name name)
                            throws javax.naming.NamingException
Specified by:
lookupLink in interface javax.naming.Context

lookupLink

public java.lang.Object lookupLink(java.lang.String name)
                            throws javax.naming.NamingException
Specified by:
lookupLink in interface javax.naming.Context

rebind

public void rebind(javax.naming.Name name,
                   java.lang.Object obj)
            throws javax.naming.NamingException
Specified by:
rebind in interface javax.naming.Context

rebind

public void rebind(java.lang.String name,
                   java.lang.Object obj)
            throws javax.naming.NamingException
Specified by:
rebind in interface javax.naming.Context

unbind

public void unbind(javax.naming.Name name)
            throws javax.naming.NamingException
Specified by:
unbind in interface javax.naming.Context

unbind

public void unbind(java.lang.String name)
            throws javax.naming.NamingException
Specified by:
unbind in interface javax.naming.Context

list

public javax.naming.NamingEnumeration list(javax.naming.Name name)
                                    throws javax.naming.NamingException
Specified by:
list in interface javax.naming.Context

list

public javax.naming.NamingEnumeration list(java.lang.String name)
                                    throws javax.naming.NamingException
Specified by:
list in interface javax.naming.Context

listBindings

public javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
                                            throws javax.naming.NamingException
Specified by:
listBindings in interface javax.naming.Context

listBindings

public javax.naming.NamingEnumeration listBindings(java.lang.String name)
                                            throws javax.naming.NamingException
Specified by:
listBindings in interface javax.naming.Context

rename

public void rename(javax.naming.Name oldName,
                   javax.naming.Name newName)
            throws javax.naming.NamingException
Specified by:
rename in interface javax.naming.Context

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
            throws javax.naming.NamingException
Specified by:
rename in interface javax.naming.Context

composeName

public javax.naming.Name composeName(javax.naming.Name oldName,
                                     javax.naming.Name newName)
                              throws javax.naming.NamingException
Specified by:
composeName in interface javax.naming.Context

composeName

public java.lang.String composeName(java.lang.String oldName,
                                    java.lang.String newName)
                             throws javax.naming.NamingException
Specified by:
composeName in interface javax.naming.Context

getNameParser

public javax.naming.NameParser getNameParser(javax.naming.Name name)
                                      throws javax.naming.NamingException
Specified by:
getNameParser in interface javax.naming.Context

getNameParser

public javax.naming.NameParser getNameParser(java.lang.String name)
                                      throws javax.naming.NamingException
Specified by:
getNameParser in interface javax.naming.Context

close

public void close()
           throws javax.naming.NamingException
Specified by:
close in interface javax.naming.Context

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).