Package ch.qos.logback.core.net.server
Class RemoteReceiverServerRunner
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.net.server.ConcurrentServerRunner<RemoteReceiverClient>
-
- ch.qos.logback.core.net.server.RemoteReceiverServerRunner
-
- All Implemented Interfaces:
ServerRunner<RemoteReceiverClient>
,ContextAware
,java.lang.Runnable
class RemoteReceiverServerRunner extends ConcurrentServerRunner<RemoteReceiverClient>
AServerRunner
that listens for connections from remote receiver component clients and delivers logging events to all connected clients.
-
-
Field Summary
Fields Modifier and Type Field Description private int
clientQueueSize
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description RemoteReceiverServerRunner(ServerListener<RemoteReceiverClient> listener, java.util.concurrent.Executor executor, int clientQueueSize)
Constructs a new server runner.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
configureClient(RemoteReceiverClient client)
Configures a connected client.-
Methods inherited from class ch.qos.logback.core.net.server.ConcurrentServerRunner
accept, isRunning, run, setRunning, 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
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Constructor Detail
-
RemoteReceiverServerRunner
public RemoteReceiverServerRunner(ServerListener<RemoteReceiverClient> listener, java.util.concurrent.Executor executor, int clientQueueSize)
Constructs a new server runner.- Parameters:
listener
- the listener from which the server will accept new clientsexecutor
- that will be used to execute asynchronous tasks on behalf of the runner.queueSize
- size of the event queue that will be maintained for each client
-
-
Method Detail
-
configureClient
protected boolean configureClient(RemoteReceiverClient client)
Configures a connected client.A subclass implements this method to perform any necessary configuration of the client object before its
Runnable.run()
method is invoked.- Specified by:
configureClient
in classConcurrentServerRunner<RemoteReceiverClient>
- Parameters:
client
- the subject client- Returns:
true
if configuration was successful; if the return value isfalse
the client connection will be dropped
-
-