Arch4J 1.1

org.arch4j.baseservices
Class BaseServicesProvider

java.lang.Object
  |
  +--org.arch4j.baseservices.BaseServicesProvider

public class BaseServicesProvider
extends Object

This class is the main provider for base system services offered by an application server or other engine. The services are accessed via the static getProvider() method.

As an example of access to the base services:

InitialContext ic = BaseServicesProvider.getProvider().getInitialContext();

Version:
1.0
Author:
David Colwell

Field Summary
protected  String BASE_SERVICES_CLASS_PROPERTY
          The base service implementation class property name.
protected  String BASE_SERVICES_DOMAIN
          The base services property file name.
 
Constructor Summary
protected BaseServicesProvider()
          Constructs an instance of this class and initializes the baseServices.
 
Method Summary
protected  Object createInstance(Class aClass)
          Create an instance from the Class.
 BaseServices getBaseServices()
          Returns a reference to the BaseServices implementation.
protected  Class getBaseServicesClass()
          Get the base services implementation class to use from the property setting.
static BaseServicesProvider getProvider()
          Returns the singleton instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_SERVICES_DOMAIN

protected final String BASE_SERVICES_DOMAIN
The base services property file name.

See Also:
Constant Field Values

BASE_SERVICES_CLASS_PROPERTY

protected final String BASE_SERVICES_CLASS_PROPERTY
The base service implementation class property name.

See Also:
Constant Field Values
Constructor Detail

BaseServicesProvider

protected BaseServicesProvider()
Constructs an instance of this class and initializes the baseServices. This is made protected so the only way to access this class is through the getProvider method.

Method Detail

getProvider

public static BaseServicesProvider getProvider()
Returns the singleton instance of this class.


getBaseServices

public BaseServices getBaseServices()
Returns a reference to the BaseServices implementation.


getBaseServicesClass

protected Class getBaseServicesClass()
Get the base services implementation class to use from the property setting.

Throws:
EnvironmentalException - if unable to retrieve the classname property or associate a Class object with the classname.

createInstance

protected Object createInstance(Class aClass)
Create an instance from the Class.

Throws:
EnvironmentalException - if fails to create a new instance of the Class.

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.