public class SocketReceiver extends ReceiverBase implements java.lang.Runnable, ch.qos.logback.core.net.SocketConnector.ExceptionHandler
ILoggingEvent objects from a
remote appender over a Socket.| Constructor and Description |
|---|
SocketReceiver() |
| Modifier and Type | Method and Description |
|---|---|
void |
connectionFailed(ch.qos.logback.core.net.SocketConnector connector,
java.lang.Exception ex) |
protected java.lang.Runnable |
getRunnableTask()
Provides the runnable task this receiver will execute.
|
protected javax.net.SocketFactory |
getSocketFactory() |
protected ch.qos.logback.core.net.SocketConnector |
newConnector(java.net.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(java.lang.String remoteHost) |
protected boolean |
shouldStart()
Determines whether this receiver should start.
|
isStarted, start, stopprotected 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 ReceiverBaseprotected void onStop()
onStop in class ReceiverBaseprotected java.lang.Runnable getRunnableTask()
ReceiverBasegetRunnableTask in class ReceiverBasepublic void run()
run in interface java.lang.Runnablepublic void connectionFailed(ch.qos.logback.core.net.SocketConnector connector,
java.lang.Exception ex)
connectionFailed in interface ch.qos.logback.core.net.SocketConnector.ExceptionHandlerprotected ch.qos.logback.core.net.SocketConnector newConnector(java.net.InetAddress address,
int port,
int initialDelay,
int retryDelay)
protected javax.net.SocketFactory getSocketFactory()
public void setRemoteHost(java.lang.String remoteHost)
public void setPort(int port)
public void setReconnectionDelay(int reconnectionDelay)
public void setAcceptConnectionTimeout(int acceptConnectionTimeout)