Class SessionTimeoutListener
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.session.helpers.SessionTimeoutListener
- All Implemented Interfaces:
Runnable
,EventListener
,SessionListener
,SshdEventListener
public class SessionTimeoutListener
extends AbstractLoggingBean
implements SessionListener, Runnable
Task that iterates over all currently open
Session
s and checks each of them for timeouts. If the
AbstractSession
has timed out (either authentication or idle timeout), the session will be disconnected.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.common.session.SessionListener
SessionListener.Event
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
void
A session has been closedvoid
sessionCreated
(Session session) A new session just been createdvoid
sessionException
(Session session, Throwable t) An exception was caught and the session will be closed (if not already so).Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.session.SessionListener
sessionDisconnect, sessionEstablished, sessionEvent, sessionNegotiationEnd, sessionNegotiationOptionsCreated, sessionNegotiationStart, sessionPeerIdentificationLine, sessionPeerIdentificationReceived, sessionPeerIdentificationSend
-
Field Details
-
sessions
-
-
Constructor Details
-
SessionTimeoutListener
public SessionTimeoutListener()
-
-
Method Details
-
sessionCreated
Description copied from interface:SessionListener
A new session just been created- Specified by:
sessionCreated
in interfaceSessionListener
- Parameters:
session
- The createdSession
-
sessionException
Description copied from interface:SessionListener
An exception was caught and the session will be closed (if not already so). Note: the code makes no guarantee that at this stageSessionListener.sessionClosed(Session)
will be called or perhaps has already been called- Specified by:
sessionException
in interfaceSessionListener
- Parameters:
session
- The referencedSession
t
- The caught exception
-
sessionClosed
Description copied from interface:SessionListener
A session has been closed- Specified by:
sessionClosed
in interfaceSessionListener
- Parameters:
s
- The closedSession
-
run
public void run()
-