Package org.eclipse.jetty.io
Interface ClientConnector.ConnectListener
- All Superinterfaces:
EventListener
- Enclosing class:
ClientConnector
A listener for events about SocketChannel.connect(SocketAddress)
.
The events are:
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onConnectBegin
(SocketChannel socketChannel, SocketAddress socketAddress) Callback method invoked just before aSocketChannel.connect(SocketAddress)
call.default void
onConnectFailure
(SocketChannel socketChannel, SocketAddress socketAddress, Throwable failure) Callback method invoked when aSocketChannel.connect(SocketAddress)
call completes with a failure.default void
onConnectSuccess
(SocketChannel socketChannel) Callback method invoked when aSocketChannel.connect(SocketAddress)
call completes successfully.
-
Method Details
-
onConnectBegin
Callback method invoked just before a
SocketChannel.connect(SocketAddress)
call.- Parameters:
socketChannel
- the local socket channel that is about to connectsocketAddress
- the remote socket address to connect to
-
onConnectSuccess
Callback method invoked when a
SocketChannel.connect(SocketAddress)
call completes successfully.- Parameters:
socketChannel
- the local socket channel that succeeded to connect to the remote socket address
-
onConnectFailure
default void onConnectFailure(SocketChannel socketChannel, SocketAddress socketAddress, Throwable failure) Callback method invoked when a
SocketChannel.connect(SocketAddress)
call completes with a failure.- Parameters:
socketChannel
- the local socket channel that failed to connect to the remote socket addresssocketAddress
- the remote socket address to connect tofailure
- the failure cause
-