Class Manager
- java.lang.Object
-
- org.opennms.netmgt.vmmgr.Manager
-
- All Implemented Interfaces:
ManagerMBean
public class Manager extends java.lang.Object implements ManagerMBean
The Manager is reponsible for launching/starting all services in the VM that it is started for. The Manager operates in two modes, normal and server
normal mode: In the normal mode, the Manager starts all services configured for its VM in the service-configuration.xml and starts listening for control events on the 'control-broadcast' JMS topic for stop control messages for itself
server mode: In the server mode, the Manager starts up and listens on the 'control-broadcast' JMS topic for 'start' control messages for services in its VM and a stop control messge for itself. When a start for a service is received, it launches only that service and sends a successful 'running' or an 'error' response to the Controller
Note: The Manager is NOT intelligent - if it receives a stop control event, it will exit - does not check to see if the services its started are all stopped
- Author:
- Brian Weaver, Sowmya Nataraj, OpenNMS.org
-
-
Constructor Summary
Constructors Constructor Description Manager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doSystemExit()
Uncleanly shutdown OpenNMS.void
doTestLoadLibraries()
doTestLoadLibrariesvoid
dumpThreads()
dumpThreadsjava.lang.Long
getUptime()
getUptimevoid
init()
Register shutdown hook to handle SIGTERM signal for the process.java.util.List<java.lang.String>
status()
statusvoid
stop()
stop
-
-
-
Method Detail
-
init
public void init()
Register shutdown hook to handle SIGTERM signal for the process.- Specified by:
init
in interfaceManagerMBean
-
stop
public void stop()
stop
- Specified by:
stop
in interfaceManagerMBean
-
status
public java.util.List<java.lang.String> status()
status
- Specified by:
status
in interfaceManagerMBean
- Returns:
- a
List
object.
-
doSystemExit
public void doSystemExit()
Uncleanly shutdown OpenNMS. This method calls {@see java.lang.System.exit(int)}, which causes the JVM to exit immediately. This method is usually invoked via JMX from another process as the last stage of shutting down OpenNMS.- Specified by:
doSystemExit
in interfaceManagerMBean
-
dumpThreads
public void dumpThreads()
Description copied from interface:ManagerMBean
dumpThreads
- Specified by:
dumpThreads
in interfaceManagerMBean
-
doTestLoadLibraries
public void doTestLoadLibraries()
doTestLoadLibraries
- Specified by:
doTestLoadLibraries
in interfaceManagerMBean
-
getUptime
public java.lang.Long getUptime()
Description copied from interface:ManagerMBean
getUptime
- Specified by:
getUptime
in interfaceManagerMBean
- Returns:
- a
Long
expressing the time, in milliseconds, since the manager first started
-
-