org.apache.naming.config
Class Config.Resource

java.lang.Object
  extended byorg.apache.naming.config.Config.Resource
Enclosing class:
Config

public static final class Config.Resource
extends java.lang.Object

Configuration for an JNDI resource reference. Resource references include the type of the resource, the parameters to be used in creating the resource instance and the JNDI name of the resource as a string, relative to the initial context.


Constructor Summary
Config.Resource()
           
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
          Adds a name-value pair to the parameters associated with this resource.
 java.lang.Object createValue()
          Creates a ResourceRef based on the configuration properties of this resource.
 java.lang.String getName()
          Returns the name of this resource.
 java.util.Map getParameters()
          Returns the parameters associated with this resource as a Map.
 java.lang.String getType()
          Returns the type of this resource.
 void setName(java.lang.String name)
          Sets the name of this resource.
 void setType(java.lang.String type)
          Sets the type of this resource.
 java.lang.String toString()
          Returns the name, type and parameter list as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Config.Resource

public Config.Resource()
Method Detail

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)
Adds a name-value pair to the parameters associated with this resource.

Parameters:
name - parameter name
value - parameter value

getName

public java.lang.String getName()
Returns the name of this resource.

Returns:
name

setName

public void setName(java.lang.String name)
Sets the name of this resource.

Parameters:
name - name.

getParameters

public java.util.Map getParameters()
Returns the parameters associated with this resource as a Map. The keys of the map are the parameter names.

Returns:
parameters

getType

public java.lang.String getType()
Returns the type of this resource.

Returns:
class name

setType

public void setType(java.lang.String type)
Sets the type of this resource.

Parameters:
type - class name.

createValue

public java.lang.Object createValue()
Creates a ResourceRef based on the configuration properties of this resource.

Returns:
ResourceRef instance.

toString

public java.lang.String toString()
Returns the name, type and parameter list as a String.

Returns:
String representation of this resource reference configuration.