Top Description Fields Constructors Methods
ch.qos.logback.core.net.server

public abstract Class AbstractServerSocketAppender<E>

extends AppenderBase<E>
Class Inheritance
Known Direct Subclasses
ch.qos.logback.core.net.server.SSLServerSocketAppenderBase
Imports
java.io.IOException, .Serializable, java.net.InetAddress, .ServerSocket, .UnknownHostException, java.util.concurrent.Executor, javax.net.ServerSocketFactory, ch.qos.logback.core.AppenderBase, ch.qos.logback.core.net.AbstractSocketAppender, ch.qos.logback.core.spi.PreSerializationTransformer

This is the super class for module specific ServerSocketAppender implementations can derive from.
Author
Carl Harris

Field Summary

Modifier and TypeField and Description
private String
private int
private int
public static final int
public static final int
DEFAULT_CLIENT_QUEUE_SIZE

Default queue size used for each client

private int
private ServerRunner<RemoteReceiverClient>
Inherited from ch.qos.logback.core.AppenderBase:
namestarted

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
append(E event)

Implements abstract ch.qos.logback.core.AppenderBase.append.

protected ServerListener<RemoteReceiverClient>
protected ServerRunner<RemoteReceiverClient>
public String

Returns:

a string representation of the local address
getAddress
()

Gets the local address for the listener.

public int

Returns:

queue depth
getBacklog
()

Gets the listener queue depth.

public int

Returns:

queue size
getClientQueueSize
()

Gets the event queue size used for each client connection.

protected InetAddress

Returns:

an InetAddress representation of the local address.
getInetAddress
()

Gets the local address for the listener.

public int

Returns:

local port
getPort
()

Gets the local port for the listener.

protected abstract PreSerializationTransformer<E>
getPST()

Gets a transformer that will be used to convert a received event to a Serializable form.

protected ServerSocketFactory

Returns:

socket factory.
getServerSocketFactory
()

Gets the factory used to create ServerSocket objects.

protected abstract void
postProcessEvent(E event)

Postprocess an event received via append().

public void
setAddress(String
a host name or a string representation of an IP address
address
)

Sets the local address for the listener.

public void
setBacklog(int
the queue depth to set
backlog
)

Sets the listener queue depth.

public void
setClientQueueSize(int
the queue size to set
clientQueueSize
)

Sets the event queue size used for each client connection.

public void
setPort(int
the local port to set
port
)

Sets the local port for the listener.

public void
public void
Inherited from ch.qos.logback.core.AppenderBase:
addFilterclearAllFiltersdoAppendgetCopyOfAttachedFiltersListgetFilterChainDecisiongetNameisStartedsetNametoString

Field Detail

addressback to summary
private String address
backlogback to summary
private int backlog
clientQueueSizeback to summary
private int clientQueueSize
DEFAULT_BACKLOGback to summary
public static final int DEFAULT_BACKLOG

Default ServerSocket backlog

DEFAULT_CLIENT_QUEUE_SIZEback to summary
public static final int DEFAULT_CLIENT_QUEUE_SIZE

Default queue size used for each client

portback to summary
private int port
runnerback to summary
private ServerRunner<RemoteReceiverClient> runner

Constructor Detail

AbstractServerSocketAppenderback to summary
public AbstractServerSocketAppender()

Method Detail

appendback to summary
protected void append(E event)

Implements abstract ch.qos.logback.core.AppenderBase.append.

Annotations
@Override
createServerListenerback to summary
protected ServerListener<RemoteReceiverClient> createServerListener(ServerSocket socket)
createServerRunnerback to summary
protected ServerRunner<RemoteReceiverClient> createServerRunner(ServerListener<RemoteReceiverClient> listener, Executor executor)
getAddressback to summary
public String getAddress()

Gets the local address for the listener.

Returns:String

a string representation of the local address

getBacklogback to summary
public int getBacklog()

Gets the listener queue depth.

This represents the number of connected clients whose connections have not yet been accepted.

Returns:int

queue depth

See Also
java.net.ServerSocket
getClientQueueSizeback to summary
public int getClientQueueSize()

Gets the event queue size used for each client connection.

Returns:int

queue size

getInetAddressback to summary
protected InetAddress getInetAddress() throws UnknownHostException

Gets the local address for the listener.

Returns:InetAddress

an InetAddress representation of the local address.

getPortback to summary
public int getPort()

Gets the local port for the listener.

Returns:int

local port

getPSTback to summary
protected abstract PreSerializationTransformer<E> getPST()

Gets a transformer that will be used to convert a received event to a Serializable form.

getServerSocketFactoryback to summary
protected ServerSocketFactory getServerSocketFactory() throws Exception

Gets the factory used to create ServerSocket objects.

The default implementation delegates to ServerSocketFactory#getDefault(). Subclasses may override to private a different socket factory implementation.

Returns:ServerSocketFactory

socket factory.

postProcessEventback to summary
protected abstract void postProcessEvent(E event)

Postprocess an event received via append().

setAddressback to summary
public void setAddress(String address)

Sets the local address for the listener.

Parameters
address:String

a host name or a string representation of an IP address

setBacklogback to summary
public void setBacklog(int backlog)

Sets the listener queue depth.

This represents the number of connected clients whose connections have not yet been accepted.

Parameters
backlog:int

the queue depth to set

See Also
java.net.ServerSocket
setClientQueueSizeback to summary
public void setClientQueueSize(int clientQueueSize)

Sets the event queue size used for each client connection.

Parameters
clientQueueSize:int

the queue size to set

setPortback to summary
public void setPort(int port)

Sets the local port for the listener.

Parameters
port:int

the local port to set

startback to summary
public void start()

Overrides ch.qos.logback.core.AppenderBase.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Annotations
@Override
stopback to summary
public void stop()

Overrides ch.qos.logback.core.AppenderBase.stop.

Implements ch.qos.logback.core.spi.LifeCycle.stop.

Annotations
@Override