com.mindbright.ssh2
public class SSH2TransportEventAdapter extends java.lang.Object implements SSH2TransportEventHandler
SSH2TransportEventHandler
.SSH2TransportEventHandler
Constructor and Description |
---|
SSH2TransportEventAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
fatalDisconnect(SSH2Transport tp,
int reason,
java.lang.String description,
java.lang.String languageTag)
Called when transport layer is disconnected for the given fatal reason by
our side of the connection.
|
void |
gotConnectInfoText(SSH2Transport tp,
java.lang.String text)
Called when an info text is received in the version negotiation stage (as
defined in the transport protocol spec.).
|
void |
gotPeerVersion(SSH2Transport tp,
java.lang.String versionString,
int major,
int minor,
java.lang.String packageVersion)
Called in the version negotiation stage when the peer version is received
(as defined in the transport protocol spec.).
|
void |
kexAgreed(SSH2Transport tp,
SSH2Preferences ourPrefs,
SSH2Preferences peerPrefs)
Called when key exchange have agreed on algorithms.
|
boolean |
kexAuthenticateHost(SSH2Transport tp,
SSH2Signature serverHostKey)
Called to authenticate server's host key.
|
void |
kexComplete(SSH2Transport tp)
Called when key exchange has been successfully completed.
|
void |
kexStart(SSH2Transport tp)
Called when key exchange starts.
|
void |
msgDebug(SSH2Transport tp,
boolean alwaysDisplay,
java.lang.String message,
java.lang.String languageTag)
Called when a DEBUG message is received.
|
void |
msgIgnore(SSH2Transport tp,
byte[] data)
Called when an IGNORE message is received.
|
void |
msgUnimplemented(SSH2Transport tp,
int rejectedSeqNum)
Called when an UNIMPLEMENTED message is received.
|
void |
normalDisconnect(SSH2Transport tp,
java.lang.String description,
java.lang.String languageTag)
Called when transport layer is disconnected gracefully by our side of
connection.
|
void |
peerDisconnect(SSH2Transport tp,
int reason,
java.lang.String description,
java.lang.String languageTag)
Called when peer disconnects the transport layer for some given
reason.
|
void |
peerSentUnknownMessage(SSH2Transport tp,
int pktType)
Called when an unimplemented message is received, and an UNIMPLEMENTED
message is sent to peer.
|
public void gotConnectInfoText(SSH2Transport tp, java.lang.String text)
SSH2TransportEventHandler
gotConnectInfoText
in interface SSH2TransportEventHandler
tp
- the transport layertext
- the info text receivedpublic void gotPeerVersion(SSH2Transport tp, java.lang.String versionString, int major, int minor, java.lang.String packageVersion)
SSH2TransportEventHandler
gotPeerVersion
in interface SSH2TransportEventHandler
tp
- the transport layerversionString
- the version string of peermajor
- the major protocol version of peerminor
- the minor protocol version of peerpackageVersion
- the package version of peerpublic void kexStart(SSH2Transport tp)
SSH2TransportEventHandler
kexStart
in interface SSH2TransportEventHandler
tp
- the transport layerpublic void kexAgreed(SSH2Transport tp, SSH2Preferences ourPrefs, SSH2Preferences peerPrefs)
SSH2TransportEventHandler
kexAgreed
in interface SSH2TransportEventHandler
tp
- the transport layerourPrefs
- our preferencespeerPrefs
- peer's preferencespublic boolean kexAuthenticateHost(SSH2Transport tp, SSH2Signature serverHostKey)
SSH2TransportEventHandler
kexAuthenticateHost
in interface SSH2TransportEventHandler
tp
- the transport layerserverHostKey
- server's host keypublic void kexComplete(SSH2Transport tp)
SSH2TransportEventHandler
kexComplete
in interface SSH2TransportEventHandler
tp
- the transport layerpublic void msgDebug(SSH2Transport tp, boolean alwaysDisplay, java.lang.String message, java.lang.String languageTag)
SSH2TransportEventHandler
msgDebug
in interface SSH2TransportEventHandler
tp
- the transport layeralwaysDisplay
- boolean flag indicating whether this message should
always be displayed or not.message
- debug message contained in the packetlanguageTag
- language tagpublic void msgIgnore(SSH2Transport tp, byte[] data)
SSH2TransportEventHandler
msgIgnore
in interface SSH2TransportEventHandler
tp
- the transport layerdata
- byte array of data contained in packetpublic void msgUnimplemented(SSH2Transport tp, int rejectedSeqNum)
SSH2TransportEventHandler
msgUnimplemented
in interface SSH2TransportEventHandler
tp
- the transport layerrejectedSeqNum
- sequence number of packet which peer didn't
understnadpublic void peerSentUnknownMessage(SSH2Transport tp, int pktType)
SSH2TransportEventHandler
peerSentUnknownMessage
in interface SSH2TransportEventHandler
tp
- the transport layerpktType
- type of message which we didn't understandpublic void normalDisconnect(SSH2Transport tp, java.lang.String description, java.lang.String languageTag)
SSH2TransportEventHandler
normalDisconnect
in interface SSH2TransportEventHandler
tp
- the transport layerdescription
- textual description for reason of disconnectlanguageTag
- language tagpublic void fatalDisconnect(SSH2Transport tp, int reason, java.lang.String description, java.lang.String languageTag)
SSH2TransportEventHandler
SSH2
for reason
codes.fatalDisconnect
in interface SSH2TransportEventHandler
tp
- the transport layerreason
- the reason codedescription
- textual description for reason of disconnectlanguageTag
- language tagSSH2
public void peerDisconnect(SSH2Transport tp, int reason, java.lang.String description, java.lang.String languageTag)
SSH2TransportEventHandler
SSH2
for reason codes.peerDisconnect
in interface SSH2TransportEventHandler
tp
- the transport layerreason
- the reason codedescription
- textual description for reason of disconnectlanguageTag
- language tagSSH2