com.cafesoft.cams
Class StandardContext

java.lang.Object
  |
  +--com.cafesoft.cams.StandardContext
All Implemented Interfaces:
Context

public class StandardContext
extends Object
implements Context

Provides configuration parameters and resources to components deployed within the Cams environment.

Since:
4/11/02

Constructor Summary
StandardContext(Config config, String homeDir, ServiceFinder serviceFinder, Logger logger)
          Create a new StandardContext.
 
Method Summary
 String getHome()
          Returns a String containing the root directory for the associated Component.
 String getInitParameter(String name)
          Returns a String containing the value of the named initialization parameter.
 Iterator getInitParameterNames()
          Returns the names of the Security Domains's initialization parameters as an Iterator of String objects, or an empty Iterator if the Security Domain has no initialization parameters.
 Logger getLogger()
          Get the Logger for this Context.
 ServiceFinder getServiceFinder()
          Get the ServiceFinder applicable to this Context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardContext

public StandardContext(Config config,
                       String homeDir,
                       ServiceFinder serviceFinder,
                       Logger logger)
Create a new StandardContext.

Parameters:
config - the associated Config object
homeDir - the configuration root directory associated with this exection Context
serviceFinder - the ServiceFinder associated with this execution Context
logger - the destination for log messages
Method Detail

getHome

public String getHome()
Returns a String containing the root directory for the associated Component.

Specified by:
getHome in interface Context
Returns:
an absolute path to the root directory for the associated component

getInitParameter

public String getInitParameter(String name)
Returns a String containing the value of the named initialization parameter.

Specified by:
getInitParameter in interface Context
Parameters:
name - a String specifying the name of the initialization parameter
Returns:
a String containing the value of the initialization parameter or null if the parameter does not exist

getInitParameterNames

public Iterator getInitParameterNames()
Returns the names of the Security Domains's initialization parameters as an Iterator of String objects, or an empty Iterator if the Security Domain has no initialization parameters.

Specified by:
getInitParameterNames in interface Context
Returns:
an Iterator of String objects containing the names of the s's initialization parameters

getServiceFinder

public ServiceFinder getServiceFinder()
Get the ServiceFinder applicable to this Context.

Specified by:
getServiceFinder in interface Context
Returns:
the ServiceFinder

getLogger

public Logger getLogger()
Get the Logger for this Context.

Specified by:
getLogger in interface Context
Returns:
the Logger object for this Context


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.