|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.platform.vm.controller.ProcessController
public abstract class ProcessController
This class is used to start up a server process and start all services that are configured under this server
Field Summary | |
---|---|
protected ClientServiceRegistry |
clientServices
|
static int |
DEFAULT_STARTER_MAX_THREADS
|
static int |
DEFAULT_STARTER_TIMETOLIVE
|
protected Host |
host
|
protected java.lang.String |
processName
|
protected ClusteredRegistryState |
registry
|
static java.lang.String |
SERVICE_MONITOR_INTERVAL
Interval to check the state of services (ms) |
static java.lang.String |
STARTER_MAX_THREADS
|
static java.lang.String |
STARTER_TIMETOLIVE
Time-to-live for threads used to start services (ms) |
Constructor Summary | |
---|---|
ProcessController(Host host,
java.lang.String processname,
ClusteredRegistryState registry,
ServerEvents serverEvents,
MessageBus bus,
HostManagement hostManagement)
Create a new instance of VMController. |
Method Summary | |
---|---|
void |
checkService(ServiceID serviceID)
Check a service, and updates the state in some cases. |
void |
dumpThreads()
Prints thread information to a log file. |
byte[] |
exportLogs()
Export the server logs to a byte[]. |
java.net.InetAddress |
getAddress()
Get the address of the host this VM is running on. |
Host |
getConfigHost()
|
java.lang.String |
getName()
Get the name for this controller. |
protected abstract WorkerPoolStats |
getProcessPoolStats()
|
protected java.util.Properties |
getProperties()
|
protected abstract SocketListenerStats |
getSocketListenerStats()
|
java.util.Date |
getStartTime()
Get the time the VM was initialized. |
ProcessStatistics |
getVMStatistics()
Return information about VM. |
boolean |
isShuttingDown()
Returns true if system is being shutdown. |
protected boolean |
isStarted()
Return TRUE if the system's services are started; i.e. |
protected void |
logMessage(java.lang.String s)
|
void |
ping()
Method called from registries to determine if VMController is alive. |
void |
setCurrentLogConfiguration(LogConfiguration logConfiguration)
Set the current log configuration for this vm. |
void |
shutdown(boolean now)
Shut down all services waiting for work to complete. |
void |
start()
Starts the VM by invoking all the deployed services |
void |
startDeployedService(ServiceComponentDefnID id)
Start the service identified by the ServiceComponentID If synch is true then wait for service to start before returning. |
void |
startService(ServiceID serviceID)
Start a previously stopped service |
void |
stopService(ServiceID id,
boolean now,
boolean shutdown)
Kill service once work is complete |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STARTER_MAX_THREADS
public static final java.lang.String STARTER_TIMETOLIVE
public static final java.lang.String SERVICE_MONITOR_INTERVAL
public static final int DEFAULT_STARTER_MAX_THREADS
public static final int DEFAULT_STARTER_TIMETOLIVE
protected Host host
protected java.lang.String processName
protected ClusteredRegistryState registry
protected ClientServiceRegistry clientServices
Constructor Detail |
---|
public ProcessController(Host host, java.lang.String processname, ClusteredRegistryState registry, ServerEvents serverEvents, MessageBus bus, HostManagement hostManagement) throws java.lang.Exception
processName
- Name of ProcessstartDeployedServices
- If true all services that are deployed to this vm are started.standalone
- If true indicates that VMController is running in its own vm.
java.lang.Exception
- if an error occurs initializing vmControllerMethod Detail |
---|
protected void logMessage(java.lang.String s)
public void start()
ProcessManagement
start
in interface ProcessManagement
public void startService(ServiceID serviceID)
ProcessManagement
startService
in interface ProcessManagement
public void startDeployedService(ServiceComponentDefnID id)
ProcessManagement
startDeployedService
in interface ProcessManagement
public void shutdown(boolean now)
shutdown
in interface ProcessManagement
public void stopService(ServiceID id, boolean now, boolean shutdown)
stopService
in interface ProcessManagement
public void setCurrentLogConfiguration(LogConfiguration logConfiguration)
setCurrentLogConfiguration
in interface ProcessManagement
public java.util.Date getStartTime()
getStartTime
in interface ProcessManagement
public Host getConfigHost()
public void ping()
ping
in interface ProcessManagement
public boolean isShuttingDown()
ProcessManagement
isShuttingDown
in interface ProcessManagement
public ProcessStatistics getVMStatistics()
getVMStatistics
in interface ProcessManagement
public void dumpThreads()
dumpThreads
in interface ProcessManagement
public byte[] exportLogs()
ProcessManagement
exportLogs
in interface ProcessManagement
ProcessManagement.exportLogs()
protected abstract SocketListenerStats getSocketListenerStats()
protected abstract WorkerPoolStats getProcessPoolStats()
public void checkService(ServiceID serviceID)
checkService
in interface ProcessManagement
serviceID
- Identifies service to be stoppedprotected java.util.Properties getProperties()
protected boolean isStarted()
callerSessionID
- ID of the caller's current session.
MetaMatrixComponentException
- if an error occurred in communicating with a component.public java.net.InetAddress getAddress()
ProcessManagement
getAddress
in interface ProcessManagement
public java.lang.String getName()
ProcessManagement
getName
in interface ProcessManagement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |