org.oddjob.jmx
Class ClientBase
java.lang.Object
org.oddjob.framework.BaseComponent
org.oddjob.framework.SimpleService
org.oddjob.jmx.ClientBase
- All Implemented Interfaces:
- Runnable, ArooaContextAware, ArooaSessionAware, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful, Stoppable
- Direct Known Subclasses:
- JMXClientJob, JMXServiceJob
public abstract class ClientBase
- extends SimpleService
Shared implementation for JMX clients.
- Author:
- rob
Constructor Summary |
ClientBase()
Construct a new instance. |
Methods inherited from class org.oddjob.framework.SimpleService |
fireDestroyedState, getName, getStateChanger, hardReset, logger, loggerName, onDestroy, run, setName, softReset, stateHandler, stop, toString |
Methods inherited from class org.oddjob.framework.BaseComponent |
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, save, setArooaContext, setArooaSession |
ClientBase
public ClientBase()
- Construct a new instance.
onStart
protected void onStart()
throws Exception
- Specified by:
onStart
in class SimpleService
- Throws:
Exception
doStart
protected abstract void doStart(MBeanServerConnection mbsc,
ScheduledExecutorService notificationProcessor)
throws Exception
- Overridden by subclasses to provide a specific startup.
- Parameters:
mbsc
- notificationProcessor
-
- Throws:
Exception
onStop
protected void onStop()
throws FailedToStopException
- Description copied from class:
SimpleService
- Allow sub classes to do something on stop.
- Overrides:
onStop
in class SimpleService
- Throws:
FailedToStopException
doStop
protected void doStop(ClientBase.WhyStop why,
Exception cause)
onStop
protected abstract void onStop(ClientBase.WhyStop why)
setConnection
public void setConnection(String lookup)
- Set naming service url.
- Parameters:
connection
- The name of the remote node in the naming service.
getConnection
public String getConnection()
- Get the JMX service URL.
- Returns:
- The name of the remote node in the naming service.
getEnvironment
public Map<String,?> getEnvironment()
setEnvironment
public void setEnvironment(Map<String,?> environment)
getHeartbeat
public long getHeartbeat()
setHeartbeat
public void setHeartbeat(long heartbeat)