org.apache.lokahi.core.agent.util
Class ProcessFactory

java.lang.Object
  extended by org.apache.lokahi.core.agent.util.ProcessFactory

public class ProcessFactory
extends java.lang.Object

Version:
$Id: ProcessFactory.java,v 1.2 2006/03/06 22:31:44 drtobes Exp $
Author:
Stephen Toback

Method Summary
static
<T extends MonitoredProcess>
void
addProcess(T t, java.lang.Process p)
           
static java.util.Collection<Monitor> getMonitors()
           
static
<T extends MonitoredProcess>
java.lang.Process
getProcess(T t)
           
static AgentTomcat getTomcatByHttpPort(int port)
           
static AgentTomcat getTomcatByHttpPort(java.lang.String port)
           
static void loadProperties(java.io.InputStream in)
           
static
<T extends MonitoredProcess>
void
removeProcess(T t)
           
static void scheduleStart(MonitoredProcess p)
          This checks the process to see if it should be restarted, if so, it schedules a start for it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadProperties

public static void loadProperties(java.io.InputStream in)

addProcess

public static <T extends MonitoredProcess> void addProcess(T t,
                                                           java.lang.Process p)

getProcess

public static <T extends MonitoredProcess> java.lang.Process getProcess(T t)

removeProcess

public static <T extends MonitoredProcess> void removeProcess(T t)

getMonitors

public static java.util.Collection<Monitor> getMonitors()

scheduleStart

public static void scheduleStart(MonitoredProcess p)
This checks the process to see if it should be restarted, if so, it schedules a start for it.

Parameters:
p -

getTomcatByHttpPort

public static AgentTomcat getTomcatByHttpPort(int port)

getTomcatByHttpPort

public static AgentTomcat getTomcatByHttpPort(java.lang.String port)