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 int
DEFAULT_PORT
the default port.static int
DEFAULT_TIMEOUT
the default timeout.protected int
m_Port
the port to use.protected ServerSocket
m_Socket
the socket in use.protected int
m_TimeOut
the 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 protected
AbstractRemoteListenerRunnable(int port, int timeout)
Initializes the runnable.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
doRun()
Listens for records till stopped.protected void
preRun()
Hook method before the run is started.protected abstract void
publish(LogRecord record)
Publishes the record.void
stopExecution()
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:
preRun
in classRunnableWithLogging
-
doRun
protected void doRun()
Listens for records till stopped.- Specified by:
doRun
in classRunnableWithLogging
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecution
in interfaceStoppable
- Overrides:
stopExecution
in classRunnableWithLogging
-
-