public class ServerSocketReceiver extends ReceiverBase
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BACKLOG
Default
ServerSocket backlog |
| Constructor and Description |
|---|
ServerSocketReceiver() |
| Modifier and Type | Method and Description |
|---|---|
protected ch.qos.logback.core.net.server.ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> |
createServerListener(java.net.ServerSocket socket) |
protected ch.qos.logback.core.net.server.ServerRunner |
createServerRunner(ch.qos.logback.core.net.server.ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> listener,
java.util.concurrent.Executor executor) |
java.lang.String |
getAddress()
Gets the local address for the listener.
|
int |
getBacklog()
Gets the listener queue depth.
|
protected java.net.InetAddress |
getInetAddress()
Gets the local address for the listener.
|
int |
getPort()
Gets the local port for the listener.
|
protected java.lang.Runnable |
getRunnableTask()
Provides the runnable task this receiver will execute.
|
protected javax.net.ServerSocketFactory |
getServerSocketFactory()
Gets the server socket factory.
|
protected void |
onStop()
Allows a subclass to participate in receiver shutdown.
|
void |
setAddress(java.lang.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, stoppublic static final int DEFAULT_BACKLOG
ServerSocket backlogprotected boolean shouldStart()
shouldStart in class ReceiverBaseprotected ch.qos.logback.core.net.server.ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> createServerListener(java.net.ServerSocket socket)
protected ch.qos.logback.core.net.server.ServerRunner createServerRunner(ch.qos.logback.core.net.server.ServerListener<ch.qos.logback.classic.net.server.RemoteAppenderClient> listener,
java.util.concurrent.Executor executor)
protected java.lang.Runnable getRunnableTask()
ReceiverBasegetRunnableTask in class ReceiverBaseprotected void onStop()
onStop in class ReceiverBaseprotected javax.net.ServerSocketFactory getServerSocketFactory()
throws java.lang.Exception
Subclasses may override to provide a custom factory.
java.lang.Exceptionprotected java.net.InetAddress getInetAddress()
throws java.net.UnknownHostException
InetAddress representation of the local address.java.net.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 java.lang.String getAddress()
public void setAddress(java.lang.String address)
address - a host name or a string representation of an IP address