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 openSessions and checks each of them for timeouts. If theAbstractSessionhas timed out (either authentication or idle timeout), the session will be disconnected.- See Also:
SessionHelper.checkForTimeouts()
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.session.SessionListener
SessionListener.Event
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<SessionHelper>sessions-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Constructor Description SessionTimeoutListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidsessionClosed(Session s)A session has been closedvoidsessionCreated(Session session)A new session just been createdvoidsessionException(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 Detail
-
sessions
protected final Set<SessionHelper> sessions
-
-
Method Detail
-
sessionCreated
public void sessionCreated(Session session)
Description copied from interface:SessionListenerA new session just been created- Specified by:
sessionCreatedin interfaceSessionListener- Parameters:
session- The createdSession
-
sessionException
public void sessionException(Session session, Throwable t)
Description copied from interface:SessionListenerAn 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:
sessionExceptionin interfaceSessionListener- Parameters:
session- The referencedSessiont- The caught exception
-
sessionClosed
public void sessionClosed(Session s)
Description copied from interface:SessionListenerA session has been closed- Specified by:
sessionClosedin interfaceSessionListener- Parameters:
s- The closedSession
-
-