public interface SessionListener extends SshdEventListener
| Modifier and Type | Interface and Description |
|---|---|
static class |
SessionListener.Event |
| Modifier and Type | Method and Description |
|---|---|
default void |
sessionClosed(Session session)
A session has been closed
|
default void |
sessionCreated(Session session)
A new session just been created
|
default void |
sessionEvent(Session session,
SessionListener.Event event)
An event has been triggered
|
default void |
sessionException(Session session,
Throwable t)
An exception was caught and the session will be closed
(if not already so).
|
default void |
sessionNegotiationEnd(Session session,
Map<KexProposalOption,String> clientProposal,
Map<KexProposalOption,String> serverProposal,
Map<KexProposalOption,String> negotiatedOptions,
Throwable reason)
Signals the end of the negotiation options handling
|
default void |
sessionNegotiationStart(Session session,
Map<KexProposalOption,String> clientProposal,
Map<KexProposalOption,String> serverProposal)
Signals the start of the negotiation options handling
|
static <L extends SessionListener> |
validateListener(L listener) |
validateListenerdefault void sessionCreated(Session session)
session - The created Sessiondefault void sessionNegotiationStart(Session session, Map<KexProposalOption,String> clientProposal, Map<KexProposalOption,String> serverProposal)
session - The referenced SessionclientProposal - The client proposal options (un-modifiable)serverProposal - The server proposal options (un-modifiable)default void sessionNegotiationEnd(Session session, Map<KexProposalOption,String> clientProposal, Map<KexProposalOption,String> serverProposal, Map<KexProposalOption,String> negotiatedOptions, Throwable reason)
session - The referenced SessionclientProposal - The client proposal options (un-modifiable)serverProposal - The server proposal options (un-modifiable)negotiatedOptions - The successfully negotiated options so far
- even if exception occurred (un-modifiable)reason - Negotiation end reason - null if successfuldefault void sessionEvent(Session session, SessionListener.Event event)
session - The referenced Sessionevent - The generated SessionListener.Eventdefault void sessionException(Session session, Throwable t)
sessionClosed(Session) will be called
or perhaps has already been calledsession - The referenced Sessiont - The caught exceptiondefault void sessionClosed(Session session)
session - The closed Sessionstatic <L extends SessionListener> L validateListener(L listener)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.