org.apache.naming.config
Class Config.Context

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

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

Configuration for a Context. Contexts contain lists of Config.Environment entries and Config.Resource references.


Constructor Summary
Config.Context()
           
 
Method Summary
 void addEnvironment(Config.Environment environment)
          Adds an Environment configuration to the environment list.
 void addResource(Config.Resource resource)
          Adds a Resource configuration to the resource list.
 void addSubContextNames(java.util.Set sortedSubcontextNameSet)
          Adds the subcontext names in this Context to the input set.
 java.util.Collection getEnvironmentList()
          Returns the environment list.
 java.lang.String getName()
          Returns the name of this context.
 java.util.Collection getResourceList()
          Returns the resource list.
 void setName(java.lang.String name)
          Sets the name of this context.
 java.lang.String toString()
          Returns a string representation of the name, environment list and resource list of this context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Config.Context

public Config.Context()
Method Detail

addEnvironment

public void addEnvironment(Config.Environment environment)
Adds an Environment configuration to the environment list.

Parameters:
environment - environment configuration to add.

addSubContextNames

public void addSubContextNames(java.util.Set sortedSubcontextNameSet)
                        throws javax.naming.InvalidNameException
Adds the subcontext names in this Context to the input set.

Parameters:
sortedSubcontextNameSet - set to be augmented with names from this context.
Throws:
javax.naming.InvalidNameException - if the configured string name of a Resource or Environment in this context is not a valid JNDI name.

addResource

public void addResource(Config.Resource resource)
Adds a Resource configuration to the resource list.

Parameters:
resource - resource configuration to add.

getEnvironmentList

public java.util.Collection getEnvironmentList()
Returns the environment list.

Returns:
list of Environment configurations in the Context

getName

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

Returns:
context name

setName

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

Parameters:
name - the name

getResourceList

public java.util.Collection getResourceList()
Returns the resource list.

Returns:
list of Resource configurations in the Context.

toString

public java.lang.String toString()
Returns a string representation of the name, environment list and resource list of this context.

Returns:
string representation of this context.