org.almendra.janet.cas.agents
Class Agent

java.lang.Object
  extended by org.almendra.janet.cas.agents.AbstractAgent
      extended by org.almendra.janet.cas.agents.Agent
All Implemented Interfaces:
INamedObject, IUniqueGlobalIdObject, ILoggable, IAgent, ICommandAcceptor

public class Agent
extends AbstractAgent


Field Summary
protected  ApplicationScheduler scheduler
           
 
Fields inherited from class org.almendra.janet.cas.agents.AbstractAgent
capability, id, LOG_EVENT_STARTED_AGENT, LOG_EVENT_STOPPED_AGENT, logger, name, node
 
Constructor Summary
protected Agent()
           
  Agent(Node node, Capability capability, ApplicationScheduler scheduler, Logger logger, java.lang.String name)
           
 
Method Summary
protected  ApplicationScheduler getApplicationScheduler()
           
 long getQueueSize()
           
protected  CommandScheduler getScheduler()
           
 boolean isApplicationAgent()
           
 boolean isIdle()
           
 boolean isSystemAgent()
           
protected  void prepareFinalize()
           
protected  void schedulerStopped()
           
 void setScheduler(ApplicationScheduler scheduler)
           
 
Methods inherited from class org.almendra.janet.cas.agents.AbstractAgent
accept, checkCapabilities, getAgentPath, getAgentProxy, getAllForeignAgents, getAllForeignAgents, getAllForeignAgents, getApplication, getCapability, getForeignAgent, getGlobalId, getLocalPath, getLogger, getName, getNode, getObjectSpace, getPath, getQualifiedName, getSystemApplication, getUniqueId, init, isActive, isSystemApplication, logStarted, logStopped, registeredLogEvents, setCommandEnvelope, setLogger, setName, setNode, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scheduler

protected ApplicationScheduler scheduler
Constructor Detail

Agent

protected Agent()

Agent

public Agent(Node node,
             Capability capability,
             ApplicationScheduler scheduler,
             Logger logger,
             java.lang.String name)
Parameters:
node -
schedulerAnchor -
logger -
name -
Method Detail

getScheduler

protected CommandScheduler getScheduler()
Specified by:
getScheduler in class AbstractAgent

getApplicationScheduler

protected ApplicationScheduler getApplicationScheduler()

schedulerStopped

protected void schedulerStopped()
Specified by:
schedulerStopped in class AbstractAgent

setScheduler

public void setScheduler(ApplicationScheduler scheduler)

isSystemAgent

public boolean isSystemAgent()
Specified by:
isSystemAgent in interface IAgent
Specified by:
isSystemAgent in class AbstractAgent

prepareFinalize

protected void prepareFinalize()
Overrides:
prepareFinalize in class AbstractAgent

isApplicationAgent

public boolean isApplicationAgent()
Specified by:
isApplicationAgent in interface IAgent
Specified by:
isApplicationAgent in class AbstractAgent

isIdle

public boolean isIdle()
Specified by:
isIdle in interface IAgent
Specified by:
isIdle in class AbstractAgent

getQueueSize

public long getQueueSize()
Specified by:
getQueueSize in interface IAgent
Specified by:
getQueueSize in class AbstractAgent
Returns: