public class ServerSocketReceiver extends ReceiverBase
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BACKLOG
Default
ServerSocket backlog |
context| Constructor and Description |
|---|
ServerSocketReceiver() |
| Modifier and Type | Method and Description |
|---|---|
protected ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> |
createServerListener(ServerSocket socket) |
protected ServerRunner |
createServerRunner(ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> listener,
Executor executor) |
String |
getAddress()
Gets the local address for the listener.
|
int |
getBacklog()
Gets the listener queue depth.
|
protected InetAddress |
getInetAddress()
Gets the local address for the listener.
|
int |
getPort()
Gets the local port for the listener.
|
protected Runnable |
getRunnableTask()
Provides the runnable task this receiver will execute.
|
protected ServerSocketFactory |
getServerSocketFactory()
Gets the server socket factory.
|
protected void |
onStop()
Allows a subclass to participate in receiver shutdown.
|
void |
setAddress(String address)
Sets the local address for the listener.
|
void |
setBacklog(int backlog)
Sets the listener queue depth.
|
void |
setPort(int port)
Sets the local port for the listener.
|
protected boolean |
shouldStart()
Starts the server.
|
isStarted, start, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic static final int DEFAULT_BACKLOG
ServerSocket backlogprotected boolean shouldStart()
shouldStart in class ReceiverBaseprotected ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> createServerListener(ServerSocket socket)
protected ServerRunner createServerRunner(ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> listener, Executor executor)
protected Runnable getRunnableTask()
ReceiverBasegetRunnableTask in class ReceiverBaseprotected void onStop()
onStop in class ReceiverBaseprotected ServerSocketFactory getServerSocketFactory() throws Exception
Subclasses may override to provide a custom factory.
Exceptionprotected InetAddress getInetAddress() throws UnknownHostException
InetAddress representation of the local address.UnknownHostExceptionpublic int getPort()
public void setPort(int port)
port - the local port to setpublic int getBacklog()
This represents the number of connected clients whose connections have not yet been accepted.
ServerSocketpublic void setBacklog(int backlog)
This represents the number of connected clients whose connections have not yet been accepted.
backlog - the queue depth to setServerSocketpublic String getAddress()
public void setAddress(String address)
address - a host name or a string representation of an IP addressCopyright © 2005–2017 QOS.ch. All rights reserved.