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, toString
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, removeIconListener, removePropertyChangeListener, removeStateListener, save, save, setArooaContext, setArooaSession
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addStateListener, lastStateEvent, removeStateListener
public static final long DEFAULT_LOG_POLLING_INTERVAL
public void addLogListener(LogListener l, java.lang.Object component, LogLevel level, long last, int history)
LogArchiver
Event numbers begin at 0. To receive all events, last must be -1.
addLogListener
in interface LogArchiver
l
- 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)
LogArchiver
removeLogListener
in interface LogArchiver
l
- The LogListener.public void addConsoleListener(LogListener l, java.lang.Object component, long last, int max)
ConsoleArchiver
addConsoleListener
in interface ConsoleArchiver
l
- 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)
ConsoleArchiver
removeConsoleListener
in interface ConsoleArchiver
l
- The LogListener.public java.lang.String consoleIdFor(java.lang.Object component)
ConsoleArchiver
consoleIdFor
in interface ConsoleArchiver
component
- The component.public void onInitialised()
BaseComponent
onInitialised
in class BaseComponent
protected void onStart() throws java.lang.Throwable
onStart
in class SimpleService
java.lang.Exception
java.lang.Throwable
protected void doStart(RemoteConnection mbsc, java.util.concurrent.ScheduledExecutorService notificationProcessor)
protected void onStop()
SimpleService
onStop
in class SimpleService
protected void doStop(WebClientJob.WhyStop why, java.lang.Exception cause)
protected void onStop(WebClientJob.WhyStop why)
public RemoteDirectory provideBeanDirectory()
RemoteDirectoryOwner
provideBeanDirectory
in interface BeanDirectoryOwner
provideBeanDirectory
in interface RemoteDirectoryOwner
BeanDirectory
or null.public void addStructuralListener(StructuralListener listener)
Structural
addStructuralListener
in interface Structural
listener
- The listener.public void removeStructuralListener(StructuralListener listener)
Structural
removeStructuralListener
in interface Structural
listener
- 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)