public class SocketReceiver extends ReceiverBase implements Runnable, SocketConnector.ExceptionHandler
ILoggingEvent
objects from a
remote appender over a Socket
.context
Constructor and Description |
---|
SocketReceiver() |
Modifier and Type | Method and Description |
---|---|
void |
connectionFailed(SocketConnector connector,
Exception ex) |
protected Runnable |
getRunnableTask()
Provides the runnable task this receiver will execute.
|
protected SocketFactory |
getSocketFactory() |
protected SocketConnector |
newConnector(InetAddress address,
int port,
int initialDelay,
int retryDelay) |
protected void |
onStop()
Allows a subclass to participate in receiver shutdown.
|
void |
run() |
void |
setAcceptConnectionTimeout(int acceptConnectionTimeout) |
void |
setPort(int port) |
void |
setReconnectionDelay(int reconnectionDelay) |
void |
setRemoteHost(String remoteHost) |
protected boolean |
shouldStart()
Determines whether this receiver should start.
|
isStarted, start, stop
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
protected boolean shouldStart()
Subclasses will implement this method to do any subclass-specific
validation. The subclass's ReceiverBase.getRunnableTask()
method will be
invoked (and the task returned will be submitted to the executor)
if and only if this method returns true
shouldStart
in class ReceiverBase
protected void onStop()
onStop
in class ReceiverBase
protected Runnable getRunnableTask()
ReceiverBase
getRunnableTask
in class ReceiverBase
public void connectionFailed(SocketConnector connector, Exception ex)
connectionFailed
in interface SocketConnector.ExceptionHandler
protected SocketConnector newConnector(InetAddress address, int port, int initialDelay, int retryDelay)
protected SocketFactory getSocketFactory()
public void setRemoteHost(String remoteHost)
public void setPort(int port)
public void setReconnectionDelay(int reconnectionDelay)
public void setAcceptConnectionTimeout(int acceptConnectionTimeout)
Copyright © 2005–2014 QOS.ch. All rights reserved.