public interface IoServiceEventListener extends SshdEventListener
Modifier and Type | Method and Description |
---|---|
default void |
abortAcceptedConnection(IoAcceptor acceptor,
java.net.SocketAddress local,
java.net.SocketAddress remote,
java.net.SocketAddress service,
java.lang.Throwable reason)
Called when a previously accepted connection has been abnormally terminated before it could be
turned into a session
|
default void |
abortEstablishedConnection(IoConnector connector,
java.net.SocketAddress local,
AttributeRepository context,
java.net.SocketAddress remote,
java.lang.Throwable reason)
Called when a previously established connection has been abnormally terminated before it could be
turned into a session
|
default void |
connectionAccepted(IoAcceptor acceptor,
java.net.SocketAddress local,
java.net.SocketAddress remote,
java.net.SocketAddress service)
Called when a new connection has been accepted from a remote peer - before it was
converted into a session
|
default void |
connectionEstablished(IoConnector connector,
java.net.SocketAddress local,
AttributeRepository context,
java.net.SocketAddress remote)
Called when a new connection has been created to a remote peer - before it was
converted into a session
|
validateListener
default void connectionEstablished(IoConnector connector, java.net.SocketAddress local, AttributeRepository context, java.net.SocketAddress remote) throws java.io.IOException
connector
- The IoConnector
through which the connection was establishedlocal
- The local connection endpointcontext
- An optional "context" provided by the user when connection
was requestedremote
- The remote connection endpointjava.io.IOException
- If failed to handle the event - in which case connection will be aborteddefault void abortEstablishedConnection(IoConnector connector, java.net.SocketAddress local, AttributeRepository context, java.net.SocketAddress remote, java.lang.Throwable reason) throws java.io.IOException
connector
- The IoConnector
through which the connection was establishedlocal
- The local connection endpointcontext
- An optional "context" provided by the user when connection
was requestedremote
- The remote connection endpointreason
- The reason for aborting - may be an exception thrown by
connectionEstablished
java.io.IOException
- If failed to handle the event - the exception is logged but does not
prevent further connections from being accepteddefault void connectionAccepted(IoAcceptor acceptor, java.net.SocketAddress local, java.net.SocketAddress remote, java.net.SocketAddress service) throws java.io.IOException
acceptor
- The IoAcceptor
through which the connection was acceptedlocal
- The local connection endpointremote
- The remote connection endpointservice
- The service listen endpoint through which the connection was acceptedjava.io.IOException
- If failed to handle the event - in which case connection will be aborteddefault void abortAcceptedConnection(IoAcceptor acceptor, java.net.SocketAddress local, java.net.SocketAddress remote, java.net.SocketAddress service, java.lang.Throwable reason) throws java.io.IOException
acceptor
- The IoAcceptor
through which the connection was acceptedlocal
- The local connection endpointremote
- The remote connection endpointservice
- The service listen endpoint through which the connection was acceptedreason
- The reason for aborting - may be an exception thrown by
connectionAccepted
java.io.IOException
- If failed to handle the event - the exception is logged but does not
prevent further connections from being accepted