com.scalagent.scheduler.monitor.ObjectMonitor Class Reference

Inherits com.scalagent.scheduler.monitor.Monitor.

Inherited by com.scalagent.scheduler.monitor.CommandMonitor.

Inheritance diagram for com.scalagent.scheduler.monitor.ObjectMonitor:

Inheritance graph
[legend]
Collaboration diagram for com.scalagent.scheduler.monitor.ObjectMonitor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ObjectMonitor (MonitorParent parent)
int getStatus ()
String getErrorMessage ()
Object getReturnValue ()
String toString ()
abstract void start () throws Exception

Protected Member Functions

void setStatus (int status) throws Exception
MonitorParent getParent ()
void setErrorMessage (String errorMessage)
void setReturnValue (Object returnValue)
void sendTo (CommandMonitor monitor, AgentId to, IndexedCommand command) throws Exception

Detailed Description

This is the base class for Monitor objects inside an agent.

Definition at line 32 of file ObjectMonitor.java.


Constructor & Destructor Documentation

com.scalagent.scheduler.monitor.ObjectMonitor.ObjectMonitor ( MonitorParent  parent  ) 

Constructor. Initializes status to NONE.

Parameters:
parent object to report status to

Definition at line 48 of file ObjectMonitor.java.


Member Function Documentation

void com.scalagent.scheduler.monitor.ObjectMonitor.setStatus ( int  status  )  throws Exception [protected]

Property accessor. Changes this Monitor status and signals new status to parent.

Parameters:
status new status

Definition at line 61 of file ObjectMonitor.java.

References com.scalagent.scheduler.monitor.MonitorParent.childReport().

Referenced by com.scalagent.scheduler.monitor.CommandMonitor.commandReport(), and com.scalagent.scheduler.monitor.CommandMonitor.start().

Here is the call graph for this function:

int com.scalagent.scheduler.monitor.ObjectMonitor.getStatus (  ) 

Property accessor.

Returns:
execution status

Definition at line 74 of file ObjectMonitor.java.

MonitorParent com.scalagent.scheduler.monitor.ObjectMonitor.getParent (  )  [protected]

Read only property accessor.

Returns:
object to report status to

Definition at line 81 of file ObjectMonitor.java.

void com.scalagent.scheduler.monitor.ObjectMonitor.setErrorMessage ( String  errorMessage  )  [protected]

Property accessor.

error message

Definition at line 88 of file ObjectMonitor.java.

Referenced by com.scalagent.scheduler.monitor.CommandMonitor.commandReport().

String com.scalagent.scheduler.monitor.ObjectMonitor.getErrorMessage (  ) 

Property accessor.

Returns:
optional error message

Implements com.scalagent.scheduler.monitor.Monitor.

Definition at line 97 of file ObjectMonitor.java.

void com.scalagent.scheduler.monitor.ObjectMonitor.setReturnValue ( Object  returnValue  )  [protected]

Property accessor.

return value

Definition at line 104 of file ObjectMonitor.java.

Referenced by com.scalagent.scheduler.monitor.CommandMonitor.commandReport().

Object com.scalagent.scheduler.monitor.ObjectMonitor.getReturnValue (  ) 

Property accessor.

Returns:
optional return value

Implements com.scalagent.scheduler.monitor.Monitor.

Definition at line 113 of file ObjectMonitor.java.

String com.scalagent.scheduler.monitor.ObjectMonitor.toString (  ) 

Provides a string image for this object.

Returns:
a string image for this object

Implements com.scalagent.scheduler.monitor.Monitor.

Reimplemented in com.scalagent.scheduler.monitor.CommandMonitor.

Definition at line 121 of file ObjectMonitor.java.

abstract void com.scalagent.scheduler.monitor.ObjectMonitor.start (  )  throws Exception [pure virtual]

Starts monitor execution.

Implements com.scalagent.scheduler.monitor.Monitor.

Implemented in com.scalagent.scheduler.monitor.CommandMonitor.

void com.scalagent.scheduler.monitor.ObjectMonitor.sendTo ( CommandMonitor  monitor,
AgentId  to,
IndexedCommand  command 
) throws Exception [protected]

Allows a enclosed CommandMonitor object to send a Command. Registers the object so that it can be forwarded the Report to.

Actual implementation is provided by enclosing agent.

This function is not necessary in Monitor interface. However this simple implementation is needed in all Monitor objects which are Monitor parents.

Parameters:
monitor object sending the command
to agent target of command
command command to send

Definition at line 148 of file ObjectMonitor.java.

References com.scalagent.scheduler.monitor.MonitorParent.sendTo().

Referenced by com.scalagent.scheduler.monitor.CommandMonitor.start().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Tue Sep 16 16:15:52 2008 for joram by  doxygen 1.5.0