Package org.apache.sshd.common.io
Interface IoServiceEventListener
-
- All Superinterfaces:
EventListener
,SshdEventListener
public interface IoServiceEventListener extends SshdEventListener
- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
abortAcceptedConnection(IoAcceptor acceptor, SocketAddress local, SocketAddress remote, SocketAddress service, Throwable reason)
Called when a previously accepted connection has been abnormally terminated before it could be turned into a sessiondefault void
abortEstablishedConnection(IoConnector connector, SocketAddress local, AttributeRepository context, SocketAddress remote, Throwable reason)
Called when a previously established connection has been abnormally terminated before it could be turned into a sessiondefault void
connectionAccepted(IoAcceptor acceptor, SocketAddress local, SocketAddress remote, SocketAddress service)
Called when a new connection has been accepted from a remote peer - before it was converted into a sessiondefault void
connectionEstablished(IoConnector connector, SocketAddress local, AttributeRepository context, SocketAddress remote)
Called when a new connection has been created to a remote peer - before it was converted into a session
-
-
-
Method Detail
-
connectionEstablished
default void connectionEstablished(IoConnector connector, SocketAddress local, AttributeRepository context, SocketAddress remote) throws IOException
Called when a new connection has been created to a remote peer - before it was converted into a session- Parameters:
connector
- TheIoConnector
through which the connection was establishedlocal
- The local connection endpointcontext
- An optional "context" provided by the user when connection was requestedremote
- The remote connection endpoint- Throws:
IOException
- If failed to handle the event - in which case connection will be aborted
-
abortEstablishedConnection
default void abortEstablishedConnection(IoConnector connector, SocketAddress local, AttributeRepository context, SocketAddress remote, Throwable reason) throws IOException
Called when a previously established connection has been abnormally terminated before it could be turned into a session- Parameters:
connector
- TheIoConnector
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 byconnectionEstablished
- Throws:
IOException
- If failed to handle the event - the exception is logged but does not prevent further connections from being accepted
-
connectionAccepted
default void connectionAccepted(IoAcceptor acceptor, SocketAddress local, SocketAddress remote, SocketAddress service) throws IOException
Called when a new connection has been accepted from a remote peer - before it was converted into a session- Parameters:
acceptor
- TheIoAcceptor
through which the connection was acceptedlocal
- The local connection endpointremote
- The remote connection endpointservice
- The service listen endpoint through which the connection was accepted- Throws:
IOException
- If failed to handle the event - in which case connection will be aborted
-
abortAcceptedConnection
default void abortAcceptedConnection(IoAcceptor acceptor, SocketAddress local, SocketAddress remote, SocketAddress service, Throwable reason) throws IOException
Called when a previously accepted connection has been abnormally terminated before it could be turned into a session- Parameters:
acceptor
- TheIoAcceptor
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 byconnectionAccepted
- Throws:
IOException
- If failed to handle the event - the exception is logged but does not prevent further connections from being accepted
-
-