org.huihoo.jfox.system
Class ComponentSupport

java.lang.Object
  extended byorg.huihoo.jfox.system.ComponentSupport
All Implemented Interfaces:
Component, Loggable, Persistentable, java.io.Serializable
Direct Known Subclasses:
ContainerImpl, DeployerSupport, IndexedObjectPoolSupport, ObjectPoolSupport, PoolDataSource, ServiceSupport, SimpleConnectionPool, SimpleThreadPool, StatefulSessionBeanObjectPool, StatelessSessionBeanObjectPool

public abstract class ComponentSupport
extends java.lang.Object
implements Component

See Also:
Serialized Form

Field Summary
protected  Logger logger
           
protected  java.lang.String name
          system name of the system
protected  java.lang.Object proxyInstance
           
protected  long sequence
           
protected  State state
          the status value of the system
 
Constructor Summary
ComponentSupport()
           
ComponentSupport(java.lang.String name)
           
 
Method Summary
 void destroy()
          doDestroy the system, tear down
protected abstract  void doDestroy()
          do actually destory action
protected abstract  void doInit()
          do actually create action
 Logger getLogger()
          get the logger
 java.lang.String getName()
          get the name of the Service, example: NamingService
 State getState()
          get the state of the Service, the status defined in Status class
 void init()
          doCreate the system, do expensive operations etc
protected static java.lang.String parseName(java.lang.String className)
           
protected  void setLogger(Logger logger)
           
protected  void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
system name of the system


state

protected volatile State state
the status value of the system


logger

protected Logger logger

sequence

protected volatile long sequence

proxyInstance

protected java.lang.Object proxyInstance
Constructor Detail

ComponentSupport

public ComponentSupport()

ComponentSupport

public ComponentSupport(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Component
get the name of the Service, example: NamingService

Specified by:
getName in interface Component

setName

protected void setName(java.lang.String name)

getState

public State getState()
Description copied from interface: Component
get the state of the Service, the status defined in Status class

Specified by:
getState in interface Component

getLogger

public Logger getLogger()
Description copied from interface: Loggable
get the logger

Specified by:
getLogger in interface Loggable

setLogger

protected void setLogger(Logger logger)

init

public void init()
          throws java.lang.Exception
Description copied from interface: Component
doCreate the system, do expensive operations etc

Specified by:
init in interface Component
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Description copied from interface: Component
doDestroy the system, tear down

Specified by:
destroy in interface Component
Throws:
java.lang.Exception

doInit

protected abstract void doInit()
                        throws java.lang.Exception
do actually create action

Throws:
java.lang.Exception

doDestroy

protected abstract void doDestroy()
                           throws java.lang.Exception
do actually destory action

Throws:
java.lang.Exception

parseName

protected static java.lang.String parseName(java.lang.String className)