Package adams.core.logging
Class RemoteReceiveHandler.AbstractRemoteListenerRunnable
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.flow.core.RunnableWithLogging
-
- adams.core.logging.RemoteReceiveHandler.AbstractRemoteListenerRunnable
-
- All Implemented Interfaces:
LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Stoppable,StoppableWithFeedback,Serializable,Runnable
- Direct Known Subclasses:
Logging.RemoteListenerRunnableWithLog,RemoteLoggingTab.RemoteListenerRunnableWithLog,RemoteReceiveHandler.RemoteListenerRunnableUsingHandler
- Enclosing class:
- RemoteReceiveHandler
public abstract static class RemoteReceiveHandler.AbstractRemoteListenerRunnable extends RunnableWithLogging
Ancestor for remote listeners.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PORTthe default port.static intDEFAULT_TIMEOUTthe default timeout.protected intm_Portthe port to use.protected ServerSocketm_Socketthe socket in use.protected intm_TimeOutthe timeout in msec.-
Fields inherited from class adams.flow.core.RunnableWithLogging
m_Running, m_Stopped
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRemoteListenerRunnable(int port, int timeout)Initializes the runnable.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoRun()Listens for records till stopped.protected voidpreRun()Hook method before the run is started.protected abstract voidpublish(LogRecord record)Publishes the record.voidstopExecution()Stops the execution.-
Methods inherited from class adams.flow.core.RunnableWithLogging
isRunning, isStopped, postRun, run, setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
the default port.- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
the default timeout.- See Also:
- Constant Field Values
-
m_Port
protected int m_Port
the port to use.
-
m_TimeOut
protected int m_TimeOut
the timeout in msec.
-
m_Socket
protected ServerSocket m_Socket
the socket in use.
-
-
Method Detail
-
publish
protected abstract void publish(LogRecord record)
Publishes the record.- Parameters:
record- the record
-
preRun
protected void preRun()
Hook method before the run is started.- Overrides:
preRunin classRunnableWithLogging
-
doRun
protected void doRun()
Listens for records till stopped.- Specified by:
doRunin classRunnableWithLogging
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecutionin interfaceStoppable- Overrides:
stopExecutionin classRunnableWithLogging
-
-