com.javaranch.unittest.helper.sql.pool
Class SimpleContext

java.lang.Object
  |
  +--com.javaranch.unittest.helper.sql.pool.SimpleContext
All Implemented Interfaces:
javax.naming.Context

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

Title: SimpleContext

Description: A very thin Context for use by JNDIUnitTestHelper

Copyright: Copyright (c) 2002

- - - - - - - - - - - - - - - - -

You are welcome to do whatever you want to with this source file provided that you maintain this comment fragment (between the dashed lines). Modify it, change the package name, change the class name ... personal or business use ... sell it, share it ... add a copyright for the portions you add ...

My goal in giving this away and maintaining the copyright is to hopefully direct developers back to JavaRanch.

The original source can be found at JavaRanch

- - - - - - - - - - - - - - - - -

Company: JavaRanch


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
SimpleContext()
           
 
Method Summary
 java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propVal)
          Method addToEnvironment not yet implemented.
 void bind(javax.naming.Name name, java.lang.Object obj)
          Method bind not yet implemented.
 void bind(java.lang.String name, java.lang.Object obj)
          Method bind the SimpleDataSource for use.
 void close()
          Method close not yet implemented.
 javax.naming.Name composeName(javax.naming.Name name, javax.naming.Name prefix)
          Method composeName not yet implemented.
 java.lang.String composeName(java.lang.String name, java.lang.String prefix)
          Method composeName not yet implemented.
 javax.naming.Context createSubcontext(javax.naming.Name name)
          Method createSubcontext not yet implemented.
 javax.naming.Context createSubcontext(java.lang.String name)
          Method createSubcontext not yet implemented.
 void destroySubcontext(javax.naming.Name name)
          Method destroySubcontext not yet implemented.
 void destroySubcontext(java.lang.String name)
          Method destroySubcontext not yet implemented.
 java.util.Hashtable getEnvironment()
          Method getEnvironment not yet implemented.
 java.lang.String getNameInNamespace()
          Method getNameInNamespace not yet implemented.
 javax.naming.NameParser getNameParser(javax.naming.Name name)
          Method getNameParser not yet implemented.
 javax.naming.NameParser getNameParser(java.lang.String name)
          Method getNameParser not yet implemented.
 javax.naming.NamingEnumeration list(javax.naming.Name name)
          Method list not yet implemented.
 javax.naming.NamingEnumeration list(java.lang.String name)
          Method list not yet implemented.
 javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
          Method listBindings not yet implemented.
 javax.naming.NamingEnumeration listBindings(java.lang.String name)
          Method listBindings not yet implemented.
 java.lang.Object lookup(javax.naming.Name name)
          Method lookup not yet implemented.
 java.lang.Object lookup(java.lang.String name)
          Method lookup Returns the SimpleDataSource.
 java.lang.Object lookupLink(javax.naming.Name name)
          Method lookupLink not yet implemented.
 java.lang.Object lookupLink(java.lang.String name)
          Method lookupLink not yet implemented.
 void rebind(javax.naming.Name name, java.lang.Object obj)
          Method rebind not yet implemented.
 void rebind(java.lang.String name, java.lang.Object obj)
          Method rebind not yet implemented.
 java.lang.Object removeFromEnvironment(java.lang.String propName)
          Method removeFromEnvironment not yet implemented.
 void rename(javax.naming.Name oldName, javax.naming.Name newName)
          Method rename not yet implemented.
 void rename(java.lang.String oldName, java.lang.String newName)
          Method rename not yet implemented.
 void unbind(javax.naming.Name name)
          Method unbind not yet implemented.
 void unbind(java.lang.String name)
          Method unbind not yet implemented.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleContext

public SimpleContext()
Method Detail

lookup

public java.lang.Object lookup(javax.naming.Name name)
                        throws javax.naming.NamingException
Method lookup not yet implemented.
Specified by:
lookup in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

lookup

public java.lang.Object lookup(java.lang.String name)
                        throws javax.naming.NamingException
Method lookup Returns the SimpleDataSource.
Specified by:
lookup in interface javax.naming.Context
Parameters:
name -  
Returns:
A copy of the SimpleDataSource class
Throws:
javax.naming.NamingException -  

bind

public void bind(javax.naming.Name name,
                 java.lang.Object obj)
          throws javax.naming.NamingException
Method bind not yet implemented.
Specified by:
bind in interface javax.naming.Context
Parameters:
name -  
obj -  
Throws:
javax.naming.NamingException -  

bind

public void bind(java.lang.String name,
                 java.lang.Object obj)
          throws javax.naming.NamingException
Method bind the SimpleDataSource for use.
Specified by:
bind in interface javax.naming.Context
Parameters:
name -  
obj -  
Throws:
javax.naming.NamingException -  

rebind

public void rebind(javax.naming.Name name,
                   java.lang.Object obj)
            throws javax.naming.NamingException
Method rebind not yet implemented.
Specified by:
rebind in interface javax.naming.Context
Parameters:
name -  
obj -  
Throws:
javax.naming.NamingException -  

rebind

public void rebind(java.lang.String name,
                   java.lang.Object obj)
            throws javax.naming.NamingException
Method rebind not yet implemented.
Specified by:
rebind in interface javax.naming.Context
Parameters:
name -  
obj -  
Throws:
javax.naming.NamingException -  

unbind

public void unbind(javax.naming.Name name)
            throws javax.naming.NamingException
Method unbind not yet implemented.
Specified by:
unbind in interface javax.naming.Context
Parameters:
name -  
Throws:
javax.naming.NamingException -  

unbind

public void unbind(java.lang.String name)
            throws javax.naming.NamingException
Method unbind not yet implemented.
Specified by:
unbind in interface javax.naming.Context
Parameters:
name -  
Throws:
javax.naming.NamingException -  

rename

public void rename(javax.naming.Name oldName,
                   javax.naming.Name newName)
            throws javax.naming.NamingException
Method rename not yet implemented.
Specified by:
rename in interface javax.naming.Context
Parameters:
oldName -  
newName -  
Throws:
javax.naming.NamingException -  

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
            throws javax.naming.NamingException
Method rename not yet implemented.
Specified by:
rename in interface javax.naming.Context
Parameters:
oldName -  
newName -  
Throws:
javax.naming.NamingException -  

list

public javax.naming.NamingEnumeration list(javax.naming.Name name)
                                    throws javax.naming.NamingException
Method list not yet implemented.
Specified by:
list in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

list

public javax.naming.NamingEnumeration list(java.lang.String name)
                                    throws javax.naming.NamingException
Method list not yet implemented.
Specified by:
list in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

listBindings

public javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
                                            throws javax.naming.NamingException
Method listBindings not yet implemented.
Specified by:
listBindings in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

listBindings

public javax.naming.NamingEnumeration listBindings(java.lang.String name)
                                            throws javax.naming.NamingException
Method listBindings not yet implemented.
Specified by:
listBindings in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

destroySubcontext

public void destroySubcontext(javax.naming.Name name)
                       throws javax.naming.NamingException
Method destroySubcontext not yet implemented.
Specified by:
destroySubcontext in interface javax.naming.Context
Parameters:
name -  
Throws:
javax.naming.NamingException -  

destroySubcontext

public void destroySubcontext(java.lang.String name)
                       throws javax.naming.NamingException
Method destroySubcontext not yet implemented.
Specified by:
destroySubcontext in interface javax.naming.Context
Parameters:
name -  
Throws:
javax.naming.NamingException -  

createSubcontext

public javax.naming.Context createSubcontext(javax.naming.Name name)
                                      throws javax.naming.NamingException
Method createSubcontext not yet implemented.
Specified by:
createSubcontext in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

createSubcontext

public javax.naming.Context createSubcontext(java.lang.String name)
                                      throws javax.naming.NamingException
Method createSubcontext not yet implemented.
Specified by:
createSubcontext in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

lookupLink

public java.lang.Object lookupLink(javax.naming.Name name)
                            throws javax.naming.NamingException
Method lookupLink not yet implemented.
Specified by:
lookupLink in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

lookupLink

public java.lang.Object lookupLink(java.lang.String name)
                            throws javax.naming.NamingException
Method lookupLink not yet implemented.
Specified by:
lookupLink in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

getNameParser

public javax.naming.NameParser getNameParser(javax.naming.Name name)
                                      throws javax.naming.NamingException
Method getNameParser not yet implemented.
Specified by:
getNameParser in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

getNameParser

public javax.naming.NameParser getNameParser(java.lang.String name)
                                      throws javax.naming.NamingException
Method getNameParser not yet implemented.
Specified by:
getNameParser in interface javax.naming.Context
Parameters:
name -  
Returns:
 
Throws:
javax.naming.NamingException -  

composeName

public javax.naming.Name composeName(javax.naming.Name name,
                                     javax.naming.Name prefix)
                              throws javax.naming.NamingException
Method composeName not yet implemented.
Specified by:
composeName in interface javax.naming.Context
Parameters:
name -  
prefix -  
Returns:
 
Throws:
javax.naming.NamingException -  

composeName

public java.lang.String composeName(java.lang.String name,
                                    java.lang.String prefix)
                             throws javax.naming.NamingException
Method composeName not yet implemented.
Specified by:
composeName in interface javax.naming.Context
Parameters:
name -  
prefix -  
Returns:
 
Throws:
javax.naming.NamingException -  

addToEnvironment

public java.lang.Object addToEnvironment(java.lang.String propName,
                                         java.lang.Object propVal)
                                  throws javax.naming.NamingException
Method addToEnvironment not yet implemented.
Specified by:
addToEnvironment in interface javax.naming.Context
Parameters:
propName -  
propVal -  
Returns:
 
Throws:
javax.naming.NamingException -  

removeFromEnvironment

public java.lang.Object removeFromEnvironment(java.lang.String propName)
                                       throws javax.naming.NamingException
Method removeFromEnvironment not yet implemented.
Specified by:
removeFromEnvironment in interface javax.naming.Context
Parameters:
propName -  
Returns:
 
Throws:
javax.naming.NamingException -  

getEnvironment

public java.util.Hashtable getEnvironment()
                                   throws javax.naming.NamingException
Method getEnvironment not yet implemented.
Specified by:
getEnvironment in interface javax.naming.Context
Returns:
 
Throws:
javax.naming.NamingException -  

close

public void close()
           throws javax.naming.NamingException
Method close not yet implemented.
Specified by:
close in interface javax.naming.Context
Throws:
javax.naming.NamingException -  

getNameInNamespace

public java.lang.String getNameInNamespace()
                                    throws javax.naming.NamingException
Method getNameInNamespace not yet implemented.
Specified by:
getNameInNamespace in interface javax.naming.Context
Returns:
 
Throws:
javax.naming.NamingException -