public class WebClientJob extends SimpleService implements Structural, LogArchiver, ConsoleArchiver, RemoteDirectoryOwner
| Modifier and Type | Class and Description |
|---|---|
protected static class |
WebClientJob.WhyStop |
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_LOG_POLLING_INTERVAL |
MAX_HISTORY, NO_LOG_AVAILABLE| Constructor and Description |
|---|
WebClientJob() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsoleListener(LogListener l,
java.lang.Object component,
long last,
int max)
Add a listener to the archiver which will receive all missed
events.
|
void |
addLogListener(LogListener l,
java.lang.Object component,
LogLevel level,
long last,
int history)
Add a listener to the archiver which will receive all missed
events.
|
void |
addStructuralListener(StructuralListener listener)
Add a listener.
|
java.lang.String |
consoleIdFor(java.lang.Object component)
Get the console id for a given component.
|
protected void |
doStart(RemoteConnection mbsc,
java.util.concurrent.ScheduledExecutorService notificationProcessor) |
protected void |
doStop(WebClientJob.WhyStop why,
java.lang.Exception cause) |
HandlerFactoryProvider |
getHandlerFactories() |
long |
getHeartbeat() |
java.lang.String |
getHost() |
long |
getLogPollingInterval() |
int |
getMaxConsoleLines() |
int |
getMaxLoggerLines() |
int |
getPort() |
void |
onInitialised()
Subclasses override this method to perform post creation
initialisation.
|
protected void |
onStart() |
protected void |
onStop()
Allow sub classes to do something on stop.
|
protected void |
onStop(WebClientJob.WhyStop why) |
RemoteDirectory |
provideBeanDirectory()
Provide a remote directory.
|
void |
removeConsoleListener(LogListener l,
java.lang.Object component)
Remove the LogListener.
|
void |
removeLogListener(LogListener l,
java.lang.Object component)
Remove the LogListener.
|
void |
removeStructuralListener(StructuralListener listener)
Remove a listener.
|
void |
setHandlerFactories(HandlerFactoryProvider handlerFactories) |
void |
setHeartbeat(long heartbeat) |
void |
setHost(java.lang.String host) |
void |
setLogPollingInterval(long logPollingInterval) |
void |
setMaxConsoleLines(int maxConsoleLines) |
void |
setMaxLoggerLines(int maxLoggerLines) |
void |
setPort(int port) |
fireDestroyedState, getName, getStateChanger, hardReset, iconHelper, logger, loggerName, onDestroy, run, setName, softReset, stateHandler, stop, toStringaddIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, removeIconListener, removePropertyChangeListener, removeStateListener, save, save, setArooaContext, setArooaSessionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddStateListener, lastStateEvent, removeStateListenerpublic static final long DEFAULT_LOG_POLLING_INTERVAL
public void addLogListener(LogListener l, java.lang.Object component, LogLevel level, long last, int history)
LogArchiverEvent numbers begin at 0. To receive all events, last must be -1.
addLogListener in interface LogArchiverl - The logListener which will receive the events.level - The level of events required.last - The last event number received. The LogArchive will
not send messages from before this number.history - The maximum messages to send up to the most recent.public void removeLogListener(LogListener l, java.lang.Object component)
LogArchiverremoveLogListener in interface LogArchiverl - The LogListener.public void addConsoleListener(LogListener l, java.lang.Object component, long last, int max)
ConsoleArchiveraddConsoleListener in interface ConsoleArchiverl - The logListener which will receive the events.component - The component whose console to receive events for.last - The last event number received. The LogArchive will
not send messages from before this number.max - The maximum messages to send up to the most recent.public void removeConsoleListener(LogListener l, java.lang.Object component)
ConsoleArchiverremoveConsoleListener in interface ConsoleArchiverl - The LogListener.public java.lang.String consoleIdFor(java.lang.Object component)
ConsoleArchiverconsoleIdFor in interface ConsoleArchivercomponent - The component.public void onInitialised()
BaseComponentonInitialised in class BaseComponentprotected void onStart()
throws java.lang.Throwable
onStart in class SimpleServicejava.lang.Exceptionjava.lang.Throwableprotected void doStart(RemoteConnection mbsc, java.util.concurrent.ScheduledExecutorService notificationProcessor)
protected void onStop()
SimpleServiceonStop in class SimpleServiceprotected void doStop(WebClientJob.WhyStop why, java.lang.Exception cause)
protected void onStop(WebClientJob.WhyStop why)
public RemoteDirectory provideBeanDirectory()
RemoteDirectoryOwnerprovideBeanDirectory in interface BeanDirectoryOwnerprovideBeanDirectory in interface RemoteDirectoryOwnerBeanDirectory or null.public void addStructuralListener(StructuralListener listener)
StructuraladdStructuralListener in interface Structurallistener - The listener.public void removeStructuralListener(StructuralListener listener)
StructuralremoveStructuralListener in interface Structurallistener - The listener.public long getHeartbeat()
public void setHeartbeat(long heartbeat)
public java.lang.String getHost()
public void setHost(java.lang.String host)
public int getPort()
public void setPort(int port)
public int getMaxConsoleLines()
public void setMaxConsoleLines(int maxConsoleLines)
public int getMaxLoggerLines()
public void setMaxLoggerLines(int maxLoggerLines)
public long getLogPollingInterval()
public void setLogPollingInterval(long logPollingInterval)
public HandlerFactoryProvider getHandlerFactories()
public void setHandlerFactories(HandlerFactoryProvider handlerFactories)