Top Description Inners Methods
ch.qos.logback.core.net

public Interface SocketConnector

extends Callable<Socket>
Known Direct Implementers
ch.qos.logback.core.net.DefaultSocketConnector
Imports
java.net.Socket, java.util.concurrent.Callable, javax.net.SocketFactory

A Runnable that (re)connects a socket.

An implementation of this interface is responsible for repeatedly attempting to create a socket connection to a remote host.

Author
Carl Harris

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
SocketConnector.ExceptionHandler

An exception handler that is notified of all exceptions that occur during the (re)connection process.

Method Summary

Modifier and TypeMethod and Description
public Socket

Returns:

the connected socket
call
()

Redeclares java.util.concurrent.Callable.call.

Blocks the calling thread until a connection is successfully established.
public void
setExceptionHandler(SocketConnector.ExceptionHandler
the handler to set
exceptionHandler
)

Sets the connector's exception handler.

public void
setSocketFactory(SocketFactory
the factory to set
socketFactory
)

Sets the connector's socket factory.

Method Detail

callback to summary
public Socket call() throws InterruptedException

Redeclares java.util.concurrent.Callable.call.

Blocks the calling thread until a connection is successfully established.

Returns:Socket

the connected socket

setExceptionHandlerback to summary
public void setExceptionHandler(SocketConnector.ExceptionHandler exceptionHandler)

Sets the connector's exception handler.

The handler must be set before the call() method is invoked.

Parameters
exceptionHandler:SocketConnector.ExceptionHandler

the handler to set

setSocketFactoryback to summary
public void setSocketFactory(SocketFactory socketFactory)

Sets the connector's socket factory.

If no factory is configured that connector will use the platform's default factory.

Parameters
socketFactory:SocketFactory

the factory to set

ch.qos.logback.core.net back to summary

public Interface SocketConnector.ExceptionHandler

Known Direct Implementers
ch.qos.logback.core.net.AbstractSocketAppender, ch.qos.logback.core.net.DefaultSocketConnector.ConsoleExceptionHandler

An exception handler that is notified of all exceptions that occur during the (re)connection process.

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

connectionFailedback to summary
public void connectionFailed(SocketConnector connector, Exception ex)