public class JMXClientJob extends ClientBase implements Structural, LogArchiver, ConsoleArchiver, RemoteDirectoryOwner
ClientBase.WhyStop
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_LOG_POLLING_INTERVAL |
MAX_HISTORY, NO_LOG_AVAILABLE
Constructor and Description |
---|
JMXClientJob() |
Modifier and Type | Method and Description |
---|---|
void |
addConsoleListener(LogListener l,
Object component,
long last,
int max)
Add a listener to the archiver which will receive all missed
events.
|
void |
addLogListener(LogListener l,
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.
|
String |
consoleIdFor(Object component)
Get the console id for a given component.
|
protected void |
doStart(MBeanServerConnection mbsc,
ScheduledExecutorService notificationProcessor)
Overridden by subclasses to provide a specific startup.
|
long |
getLogPollingInterval() |
int |
getMaxConsoleLines() |
int |
getMaxLoggerLines() |
void |
onInitialised()
Subclasses override this method to perform post creation
initialisation.
|
protected void |
onStop(ClientBase.WhyStop why) |
RemoteDirectory |
provideBeanDirectory()
Provide a remote directory.
|
void |
removeConsoleListener(LogListener l,
Object component)
Remove the LogListener.
|
void |
removeLogListener(LogListener l,
Object component)
Remove the LogListener.
|
void |
removeStructuralListener(StructuralListener listener)
Remove a listener.
|
void |
setLogPollingInterval(long logPollingInterval) |
void |
setMaxConsoleLines(int maxConsoleLines) |
void |
setMaxLoggerLines(int maxLoggerLines) |
void |
setUrl(String url)
Deprecated.
|
doStop, getConnection, getEnvironment, getHeartbeat, onStart, onStop, setConnection, setEnvironment, setHeartbeat
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
@Deprecated public void setUrl(String url)
Property: url
Description: This property is now deprecated in favour of connection which reflects that the connection string no longer need only be a full JMX URL.
Required: No.
public void addLogListener(LogListener l, 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, Object component)
LogArchiver
removeLogListener
in interface LogArchiver
l
- The LogListener.public void addConsoleListener(LogListener l, 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, Object component)
ConsoleArchiver
removeConsoleListener
in interface ConsoleArchiver
l
- The LogListener.public String consoleIdFor(Object component)
ConsoleArchiver
consoleIdFor
in interface ConsoleArchiver
component
- The component.public void onInitialised()
BaseComponent
onInitialised
in class BaseComponent
protected void doStart(MBeanServerConnection mbsc, ScheduledExecutorService notificationProcessor) throws Exception
ClientBase
doStart
in class ClientBase
Exception
protected void onStop(ClientBase.WhyStop why)
onStop
in class ClientBase
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 int getMaxConsoleLines()
public void setMaxConsoleLines(int maxConsoleLines)
public int getMaxLoggerLines()
public void setMaxLoggerLines(int maxLoggerLines)
public long getLogPollingInterval()
public void setLogPollingInterval(long logPollingInterval)