ccc.commons
Class JNDI

java.lang.Object
  extended by ccc.commons.JNDI
All Implemented Interfaces:
Registry

public final class JNDI
extends java.lang.Object
implements Registry

JNDI utility class.

Author:
Civic Computing Ltd

Constructor Summary
JNDI()
          Constructor.
JNDI(java.lang.String providerURL)
          Constructor.
 
Method Summary
<T> T
get(java.lang.String location)
          Get an object from the registry.
 Registry put(java.lang.String location, java.lang.Object object)
          Put an object into JNDI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDI

public JNDI()
Constructor.


JNDI

public JNDI(java.lang.String providerURL)
Constructor.

Parameters:
providerURL - The java naming provider URL
Method Detail

put

public Registry put(java.lang.String location,
                    java.lang.Object object)
Put an object into JNDI.

Specified by:
put in interface Registry
Parameters:
location - Location in the in the registry.
object - The object to put.
Returns:
'this' to allow a registry to be used in a 'fluently'.

get

public <T> T get(java.lang.String location)
Get an object from the registry.

Specified by:
get in interface Registry
Type Parameters:
T - The type of the object at the specified location.
Parameters:
location - Location in the registry.
Returns:
The object at the specified location or NULL if the location is not found.


Copyright © 2010. All Rights Reserved.