com.scalagent.task.util.ProcessManager Class Reference

Collaboration diagram for com.scalagent.task.util.ProcessManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

String toString ()
synchronized void register (Process process, AgentId agent) throws Exception
synchronized void destroy (AgentId agent) throws Exception

Static Public Member Functions

static void init (String args, boolean firstTime) throws Exception

Static Public Attributes

static ProcessManager manager

Package Functions

void save () throws IOException
 ProcessManager ()
synchronized void unregister (ProcessMonitor monitor) throws Exception

Static Package Functions

static ProcessManager load () throws IOException, ClassNotFoundException

Package Attributes

Vector registry

Static Package Attributes

static Logger xlogmon = null

Detailed Description

Object which monitors processes execution. There is only one ProcessManager object per agent server. It eventually signals the process end to the registered agent by an external ProcessEnd notification.

The ProcessManager object is initialized in init, called from AgentServer.init.

This classes reuses the persistency service provided by Transaction.

See also:
ProcessEnd

ProcessMonitor

Definition at line 48 of file ProcessManager.java.


Constructor & Destructor Documentation

com.scalagent.task.util.ProcessManager.ProcessManager (  )  [package]

Default constructor.

Definition at line 111 of file ProcessManager.java.

References com.scalagent.task.util.ProcessManager.registry.

Referenced by com.scalagent.task.util.ProcessManager.init().


Member Function Documentation

static void com.scalagent.task.util.ProcessManager.init ( String  args,
boolean  firstTime 
) throws Exception [static]

Initializes the ProcessManager object.

Exceptions:
Exception unspecialized exception

Definition at line 60 of file ProcessManager.java.

References com.scalagent.task.util.ProcessManager.load(), com.scalagent.task.util.ProcessManager.manager, com.scalagent.task.util.ProcessManager.ProcessManager(), com.scalagent.task.util.ProcessManager.registry, com.scalagent.task.util.ProcessManager.save(), and com.scalagent.task.util.ProcessManager.xlogmon.

Here is the call graph for this function:

static ProcessManager com.scalagent.task.util.ProcessManager.load (  )  throws IOException, ClassNotFoundException [static, package]

Builds object from persistent image.

Returns:
loaded object or null if no persistent image exists
Exceptions:
IOException when accessing the stored image
ClassNotFoundException if the stored image class may not be found

Definition at line 93 of file ProcessManager.java.

References com.scalagent.task.util.ProcessManager.load().

Referenced by com.scalagent.task.util.ProcessManager.init(), and com.scalagent.task.util.ProcessManager.load().

Here is the call graph for this function:

void com.scalagent.task.util.ProcessManager.save (  )  throws IOException [package]

Saves object in persistent storage.

Definition at line 100 of file ProcessManager.java.

References com.scalagent.task.util.ProcessManager.manager.

Referenced by com.scalagent.task.util.ProcessManager.init(), com.scalagent.task.util.ProcessManager.register(), and com.scalagent.task.util.ProcessManager.unregister().

String com.scalagent.task.util.ProcessManager.toString (  ) 

Provides a string image for this object.

Returns:
a string image for this object

Definition at line 121 of file ProcessManager.java.

References com.scalagent.task.util.ProcessManager.registry.

synchronized void com.scalagent.task.util.ProcessManager.register ( Process  process,
AgentId  agent 
) throws Exception

Registers the Process object with the monitoring agent. This ProcessManager delegates the process management to a ProcessMonitor running in a separate thread as a Driver. When the process terminates the ProcessMonitor unregisters from this ProcessManager.

Parameters:
process process to monitor
agent agent to warn when process terminates
Exceptions:
Exception unspecialized exception

Definition at line 140 of file ProcessManager.java.

References com.scalagent.task.util.ProcessManager.registry, and com.scalagent.task.util.ProcessManager.save().

Here is the call graph for this function:

synchronized void com.scalagent.task.util.ProcessManager.unregister ( ProcessMonitor  monitor  )  throws Exception [package]

Unregisters terminated process.

This function is executed by the ProcessMonitor from a separate thread.

Parameters:
monitor ProcessMonitor object managing the terminated process
Exceptions:
Exception unspecialized exception

Definition at line 158 of file ProcessManager.java.

References com.scalagent.task.util.ProcessManager.registry, and com.scalagent.task.util.ProcessManager.save().

Here is the call graph for this function:

synchronized void com.scalagent.task.util.ProcessManager.destroy ( AgentId  agent  )  throws Exception

Kills a process identified by the agent associated with it.

Parameters:
agent agent associated with the process to kill
Exceptions:
Exception unspecialized exception

Definition at line 171 of file ProcessManager.java.

References com.scalagent.task.util.ProcessMonitor.agent, com.scalagent.task.util.ProcessMonitor.process, and com.scalagent.task.util.ProcessManager.registry.


Member Data Documentation

ProcessManager com.scalagent.task.util.ProcessManager.manager [static]

the unique ProcessManager in the agent server

Definition at line 50 of file ProcessManager.java.

Referenced by com.scalagent.task.util.ProcessManager.init(), and com.scalagent.task.util.ProcessManager.save().

Vector com.scalagent.task.util.ProcessManager.registry [package]

repository holding ProcessMonitors

Definition at line 106 of file ProcessManager.java.

Referenced by com.scalagent.task.util.ProcessManager.destroy(), com.scalagent.task.util.ProcessManager.init(), com.scalagent.task.util.ProcessManager.ProcessManager(), com.scalagent.task.util.ProcessManager.register(), com.scalagent.task.util.ProcessManager.toString(), and com.scalagent.task.util.ProcessManager.unregister().


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