toolbox.services
Class ServiceConfig

Package class diagram package ServiceConfig
java.lang.Object
  extended by toolbox.services.ServiceConfig

 class ServiceConfig
extends java.lang.Object

Package protected class to store the configuration of a service for the default service registry.


Constructor Summary
ServiceConfig(java.lang.String svcHome, java.lang.String name, java.lang.String env, java.lang.String className, boolean singleton, boolean pojo, boolean relative, java.lang.String config, java.util.List deps, java.util.List intercptrs)
          Create an new service config.
 
Method Summary
(package private)  java.lang.String getClassName()
          Return the name of service implementation class.
(package private)  XMLProperties getConfig()
          Return the XML configuration for the service.
(package private)  java.lang.String getConfigHome()
          Return the service configuration home.
(package private)  java.lang.String getConfigPath()
          Return the location of the service configuration.
(package private)  java.util.List getDependencies()
          Return the List of dependency definitions for the service.
(package private)  java.lang.String getEnvironment()
          Return the name of the service environment that must be injected into the service.
(package private)  java.util.List getInterceptors()
          Return the List of interceptor definitions for the service.
(package private)  java.lang.String getName()
          Return the name of the service.
(package private)  boolean isConfigRelative()
          Return the flag to indicate whether the service configuration is relative to the configuration home directory.
(package private)  boolean isPojo()
          Return the flag to indicate whether the service is a plain java object or a Service implementation.
(package private)  boolean isSingleton()
          Return the flag to indicate whether the service should be handled as singleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceConfig

ServiceConfig(java.lang.String svcHome,
              java.lang.String name,
              java.lang.String env,
              java.lang.String className,
              boolean singleton,
              boolean pojo,
              boolean relative,
              java.lang.String config,
              java.util.List deps,
              java.util.List intercptrs)
        throws ServiceException
Create an new service config.

Parameters:
svcHome - String containing the services home directory path.
name - String containing the name of the service.
env - The name of the service environment that must be injected into the service at creation time.
className - The name of service implementation class.
singleton - Primitive boolean to indicate whether the service must be handled as a singleton.
pojo - Primitive boolean indicating that the service is a plain java object.
relative - Primitive boolean indicating whether the service configuratio is relative to the service home directory.
config - String containing the path to the service config.
deps - List containing service dependency definitions.
intercptrs - List containing service interceptor definitions.
Throws:
ServiceException - if the configuration cannot be created.
Method Detail

getName

java.lang.String getName()
Return the name of the service.

Returns:
String containing name of the service.

getConfigHome

java.lang.String getConfigHome()
Return the service configuration home.

Returns:
String containing the service configuration home.

getEnvironment

java.lang.String getEnvironment()
Return the name of the service environment that must be injected into the service.

Returns:
String containing name of the service environment.

getClassName

java.lang.String getClassName()
Return the name of service implementation class.

Returns:
String containing the service implementation class.

isConfigRelative

boolean isConfigRelative()
Return the flag to indicate whether the service configuration is relative to the configuration home directory.

Returns:
boolean

isSingleton

boolean isSingleton()
Return the flag to indicate whether the service should be handled as singleton.

Returns:
boolean

isPojo

boolean isPojo()
Return the flag to indicate whether the service is a plain java object or a Service implementation.

Returns:
boolean

getConfigPath

java.lang.String getConfigPath()
Return the location of the service configuration.

If the configuration is relative, the configuration home value will be pre-pended.

Returns:
String containing configuration path.

getConfig

XMLProperties getConfig()
Return the XML configuration for the service.

Returns:
XMLProperties

getDependencies

java.util.List getDependencies()
Return the List of dependency definitions for the service.

Returns:
List

getInterceptors

java.util.List getInterceptors()
Return the List of interceptor definitions for the service.

Returns:
List