|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.classic.net.ReceiverBase
ch.qos.logback.classic.net.server.ServerSocketReceiver
public class ServerSocketReceiver
A logging socket server that is configurable using Joran.
Field Summary | |
---|---|
static int |
DEFAULT_BACKLOG
Default ServerSocket backlog |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
ServerSocketReceiver()
|
Method Summary | |
---|---|
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. |
Methods inherited from class ch.qos.logback.classic.net.ReceiverBase |
---|
isStarted, start, stop |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BACKLOG
ServerSocket
backlog
Constructor Detail |
---|
public ServerSocketReceiver()
Method Detail |
---|
protected 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 address
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |