Package org.opennms.netmgt.daemon
Class AbstractSpringContextJmxServiceDaemon<T extends SpringServiceDaemon>
- java.lang.Object
-
- org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon<T>
-
- All Implemented Interfaces:
BaseOnmsMBean
- Direct Known Subclasses:
AsteriskGateway
,Collectd
,Discovery
,EnhancedLinkd
,Eventd
,JettyServer
,Notifd
,Pollerd
,Queued
,Rtcd
,SimpleSpringContextJmxServiceDaemon
,SnmpPollerd
,Statsd
,Syslogd
,Tl1d
,Trapd
,TroubleTicketer
public abstract class AbstractSpringContextJmxServiceDaemon<T extends SpringServiceDaemon> extends java.lang.Object implements BaseOnmsMBean
Abstract AbstractSpringContextJmxServiceDaemon class.
- Author:
- Mathew Brozowski, DJ Gregor
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DAEMON_BEAN_NAME
ConstantDAEMON_BEAN_NAME="daemon"
-
Constructor Summary
Constructors Constructor Description AbstractSpringContextJmxServiceDaemon()
Constructor for AbstractSpringContextJmxServiceDaemon.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.springframework.context.ApplicationContext
getContext()
This is here for unit tests to use.T
getDaemon()
Get the service daemon object that this JMX MBean represents.protected abstract java.lang.String
getLoggingPrefix()
getLoggingPrefixprotected abstract java.lang.String
getSpringContext()
getSpringContextint
getStatus()
getStatusjava.lang.String
getStatusText()
getStatusTextvoid
init()
initvoid
start()
startjava.lang.String
status()
statusvoid
stop()
stop
-
-
-
Field Detail
-
DAEMON_BEAN_NAME
public static final java.lang.String DAEMON_BEAN_NAME
ConstantDAEMON_BEAN_NAME="daemon"
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSpringContext
protected abstract java.lang.String getSpringContext()
getSpringContext
- Returns:
- a
String
object.
-
getLoggingPrefix
protected abstract java.lang.String getLoggingPrefix()
getLoggingPrefix
- Returns:
- a
String
object.
-
getContext
protected org.springframework.context.ApplicationContext getContext()
This is here for unit tests to use.- Returns:
- a
ApplicationContext
object.
-
init
public final void init()
init
- Specified by:
init
in interfaceBaseOnmsMBean
-
start
public final void start()
start
- Specified by:
start
in interfaceBaseOnmsMBean
-
getDaemon
public T getDaemon()
Get the service daemon object that this JMX MBean represents.- Returns:
- the service daemon object
-
stop
public final void stop()
stop
- Specified by:
stop
in interfaceBaseOnmsMBean
-
getStatus
public final int getStatus()
getStatus
- Specified by:
getStatus
in interfaceBaseOnmsMBean
- Returns:
- a int.
-
status
public final java.lang.String status()
status
- Specified by:
status
in interfaceBaseOnmsMBean
- Returns:
- a
String
object.
-
getStatusText
public final java.lang.String getStatusText()
getStatusText
- Specified by:
getStatusText
in interfaceBaseOnmsMBean
- Returns:
- a
String
object.
-
-