com.pentec.aserver
Class AServerAgent

java.lang.Object
  extended by java.lang.Thread
      extended by com.pentec.aserver.AServerPlugin
          extended by com.pentec.aserver.AServerAgent
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
FISTd, Managed, NVLensd

public abstract class AServerAgent
extends AServerPlugin

AServerAgent is an AServerPlugin derivative designed to work as an agent on behalf of AServer. It's sole purpose is to launch, shutdown, and otherwise control AServerPlugins to which AServer has no direct tie. It's particularly useful for packages with multiple AServerPlugins. AServer only needs to know about the one agent which manages all the worker plugins.

Author:
Pender Technology

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class com.pentec.aserver.AServerPlugin
isOkToRun, SIG_INIT_FAILED, SIG_INITIALIZING, SIG_QUITTING, SIG_RUNNING, STATE_INIT_FAILED, STATE_INITIALIZING, STATE_QUITTING, STATE_RUNNING, STATE_STARTING, STATE_WAITING_TO_START, vPlugins
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AServerAgent(java.lang.String $Name, java.lang.String $Version)
           
AServerAgent(java.lang.String $Name, java.lang.String $Version, java.lang.String $InstanceIdentifier)
           
 
Method Summary
protected  boolean initialize()
          Initialize the agent
 void run()
          Initialize the agent.
protected abstract  void startPlugins()
          Start plugins under this agent's control
protected abstract  void stopPlugins()
          Stop plugins under this agent's control
 
Methods inherited from class com.pentec.aserver.AServerPlugin
getFullyQualifiedPluginName, getNumPlugins, getPluginInstanceIdentifier, getPluginName, getPluginState, getPluginStateByName, getPluginVersion, setPluginInstanceIdentifier, signalInitFailed, signalInitializing, signalQuitting, signalRunning, startPlugin, stopPlugin, toString, writeLog, writeLog
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AServerAgent

public AServerAgent(java.lang.String $Name,
                    java.lang.String $Version)

AServerAgent

public AServerAgent(java.lang.String $Name,
                    java.lang.String $Version,
                    java.lang.String $InstanceIdentifier)
Method Detail

initialize

protected boolean initialize()
Initialize the agent


run

public final void run()
Initialize the agent. If initialization is successful, start plugins under this agent's control. Then sleep until notified to stop. Finally, stop the plugin's under this agent's control.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class AServerPlugin

startPlugins

protected abstract void startPlugins()
Start plugins under this agent's control


stopPlugins

protected abstract void stopPlugins()
Stop plugins under this agent's control