org.opennms.netmgt.daemon
Class AbstractSpringContextJmxServiceDaemon<T extends SpringServiceDaemon>

java.lang.Object
  extended by org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon<T>
All Implemented Interfaces:
BaseOnmsMBean
Direct Known Subclasses:
SimpleSpringContextJmxServiceDaemon

public abstract class AbstractSpringContextJmxServiceDaemon<T extends SpringServiceDaemon>
extends Object
implements BaseOnmsMBean

Author:
Mathew Brozowski, DJ Gregor

Field Summary
static String DAEMON_BEAN_NAME
           
 
Constructor Summary
AbstractSpringContextJmxServiceDaemon()
           
 
Method Summary
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  String getLoggingPrefix()
           
protected abstract  String getSpringContext()
           
 int getStatus()
           
 String getStatusText()
           
 void init()
           
 void start()
           
 String status()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAEMON_BEAN_NAME

public static final String DAEMON_BEAN_NAME
See Also:
Constant Field Values
Constructor Detail

AbstractSpringContextJmxServiceDaemon

public AbstractSpringContextJmxServiceDaemon()
Method Detail

getSpringContext

protected abstract String getSpringContext()

getLoggingPrefix

protected abstract String getLoggingPrefix()

getContext

protected org.springframework.context.ApplicationContext getContext()
This is here for unit tests to use.


init

public final void init()
Specified by:
init in interface BaseOnmsMBean

start

public final void start()
Specified by:
start in interface BaseOnmsMBean

getDaemon

public T getDaemon()
Get the service daemon object that this JMX MBean represents.

Returns:
the service daemon object

stop

public final void stop()
Specified by:
stop in interface BaseOnmsMBean

getStatus

public final int getStatus()
Specified by:
getStatus in interface BaseOnmsMBean

status

public final String status()
Specified by:
status in interface BaseOnmsMBean

getStatusText

public final String getStatusText()
Specified by:
getStatusText in interface BaseOnmsMBean


Copyright © 2009. All Rights Reserved.