Package org.apache.sshd.common.io
Interface IoServiceEventListener
-
- All Superinterfaces:
java.util.EventListener
,SshdEventListener
public interface IoServiceEventListener extends SshdEventListener
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method 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 sessiondefault 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 sessiondefault 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 sessiondefault 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
-
-
-
Method Detail
-
connectionEstablished
default void connectionEstablished(IoConnector connector, java.net.SocketAddress local, AttributeRepository context, java.net.SocketAddress remote) throws java.io.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:
java.io.IOException
- If failed to handle the event - in which case connection will be aborted
-
abortEstablishedConnection
default void abortEstablishedConnection(IoConnector connector, java.net.SocketAddress local, AttributeRepository context, java.net.SocketAddress remote, java.lang.Throwable reason) throws java.io.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:
java.io.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, java.net.SocketAddress local, java.net.SocketAddress remote, java.net.SocketAddress service) throws java.io.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:
java.io.IOException
- If failed to handle the event - in which case connection will be aborted
-
abortAcceptedConnection
default void abortAcceptedConnection(IoAcceptor acceptor, java.net.SocketAddress local, java.net.SocketAddress remote, java.net.SocketAddress service, java.lang.Throwable reason) throws java.io.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:
java.io.IOException
- If failed to handle the event - the exception is logged but does not prevent further connections from being accepted
-
-