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(javax.management.MBeanServerConnection mbsc,
java.util.concurrent.ScheduledExecutorService notificationProcessor)
Overridden by subclasses to provide a specific startup.
|
protected void |
doStop(ClientBase.WhyStop why,
java.lang.Exception cause) |
java.lang.String |
getConnection()
Get the JMX service URL.
|
java.util.Map<java.lang.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(java.lang.String connection)
Set naming service url.
|
void |
setEnvironment(java.util.Map<java.lang.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 java.lang.Exception
onStart
in class SimpleService
java.lang.Exception
protected abstract void doStart(javax.management.MBeanServerConnection mbsc, java.util.concurrent.ScheduledExecutorService notificationProcessor) throws java.lang.Exception
mbsc
- notificationProcessor
- java.lang.Exception
protected void onStop()
SimpleService
onStop
in class SimpleService
protected void doStop(ClientBase.WhyStop why, java.lang.Exception cause)
protected abstract void onStop(ClientBase.WhyStop why)
public void setConnection(java.lang.String connection)
connection
- The name of the remote node in the naming service.public java.lang.String getConnection()
public java.util.Map<java.lang.String,?> getEnvironment()
public void setEnvironment(java.util.Map<java.lang.String,?> environment)
public long getHeartbeat()
public void setHeartbeat(long heartbeat)