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, stop
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
public static final int DEFAULT_BACKLOG
ServerSocket
backlogprotected boolean shouldStart()
shouldStart
in class ReceiverBase
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)
protected Runnable getRunnableTask()
ReceiverBase
getRunnableTask
in class ReceiverBase
protected void onStop()
onStop
in class ReceiverBase
protected ServerSocketFactory getServerSocketFactory() throws Exception
Subclasses may override to provide a custom factory.
Exception
protected InetAddress getInetAddress() throws UnknownHostException
InetAddress
representation of the local address.UnknownHostException
public 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.
ServerSocket
public void setBacklog(int backlog)
This represents the number of connected clients whose connections have not yet been accepted.
backlog
- the queue depth to setServerSocket
public String getAddress()
public void setAddress(String address)
address
- a host name or a string representation of an IP addressCopyright © 2005–2021 QOS.ch. All rights reserved.