Interface SessionListenerManager
- All Known Subinterfaces:
ClientFactoryManager, ClientSession, FactoryManager, ServerFactoryManager, ServerSession, Session
- All Known Implementing Classes:
AbstractClientSession, AbstractFactoryManager, AbstractServerSession, AbstractSession, ClientSessionImpl, ServerSessionImpl, SessionHelper, SshClient, SshServer
public interface SessionListenerManager
Marker interface for classes that allow to add/remove session listeners. Note: if adding/removing listeners
while connections are being established and/or torn down there are no guarantees as to the order of the calls to the
recently added/removed listener's methods in the interim. The correct order is guaranteed only as of the next
session after the listener has been added/removed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSessionListener(SessionListener listener) Add a session listener.voidremoveSessionListener(SessionListener listener) Remove a session listener.
-
Method Details
-
addSessionListener
Add a session listener.- Parameters:
listener- TheSessionListenerto add - notnull
-
removeSessionListener
Remove a session listener.- Parameters:
listener- TheSessionListenerto remove
-
getSessionListenerProxy
SessionListener getSessionListenerProxy()- Returns:
- A (never
nullproxySessionListenerthat represents all the currently registered listeners. Any method invocation on the proxy is replicated to the currently registered listeners
-