public abstract class ClientBase extends SimpleService
Modifier and Type | Class and Description |
---|---|
protected static class |
ClientBase.WhyStop |
Constructor and Description |
---|
ClientBase()
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doStart(MBeanServerConnection mbsc,
ScheduledExecutorService notificationProcessor)
Overridden by subclasses to provide a specific startup.
|
protected void |
doStop(ClientBase.WhyStop why,
Exception cause) |
String |
getConnection()
Get the JMX service URL.
|
Map<String,?> |
getEnvironment() |
long |
getHeartbeat() |
protected void |
onStart() |
protected void |
onStop()
Allow sub classes to do something on stop.
|
protected abstract void |
onStop(ClientBase.WhyStop why) |
void |
setConnection(String lookup)
Set naming service url.
|
void |
setEnvironment(Map<String,?> environment) |
void |
setHeartbeat(long heartbeat) |
fireDestroyedState, getName, getStateChanger, hardReset, iconHelper, logger, loggerName, onDestroy, run, setName, softReset, stateHandler, stop, toString
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, save, setArooaContext, setArooaSession
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addStateListener, lastStateEvent, removeStateListener
protected void onStart() throws Exception
onStart
in class SimpleService
Exception
protected abstract void doStart(MBeanServerConnection mbsc, ScheduledExecutorService notificationProcessor) throws Exception
mbsc
- notificationProcessor
- Exception
protected void onStop() throws FailedToStopException
SimpleService
onStop
in class SimpleService
FailedToStopException
protected void doStop(ClientBase.WhyStop why, Exception cause)
protected abstract void onStop(ClientBase.WhyStop why)
public void setConnection(String lookup)
connection
- The name of the remote node in the naming service.public String getConnection()
public long getHeartbeat()
public void setHeartbeat(long heartbeat)