Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mindbright.ssh2
Class SSH2TransportEventAdapter

    java.lang.Object
      com.mindbright.ssh2.SSH2TransportEventAdapter

All Implemented Interfaces:
  SSH2TransportEventHandler

Direct Known Subclasses:
  SSH2HostKeyVerifier

public class SSH2TransportEventAdapter
extends java.lang.Object
implements SSH2TransportEventHandler

This class is an adapter for the interface `SSH2TransportEventHandler`.

See Also:
  `SSH2TransportEventHandler`

Constructor Summary
`SSH2TransportEventAdapter()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SSH2TransportEventAdapter

    public SSH2TransportEventAdapter()

Method Detail

### gotConnectInfoText

    public void gotConnectInfoText(SSH2Transport tp,
                                   java.lang.String text)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when an info text is received in the version negotiation stage (as defined in the transport protocol spec.).

  Specified by:
    `gotConnectInfoText` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `text` - the info text received

### gotPeerVersion

    public void gotPeerVersion(SSH2Transport tp,
                               java.lang.String versionString,
                               int major,
                               int minor,
                               java.lang.String packageVersion)

  Description copied from interface: `SSH2TransportEventHandler`
  Called in the version negotiation stage when the peer version is received (as defined in the transport protocol spec.).

  Specified by:
    `gotPeerVersion` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `versionString` - the version string of peer
    `major` - the major protocol version of peer
    `minor` - the minor protocol version of peer
    `packageVersion` - the package version of peer

### kexStart

    public void kexStart(SSH2Transport tp)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when key exchange starts. That is when a KEXINIT message is sent to the peer.

  Specified by:
    `kexStart` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer

### kexAgreed

    public void kexAgreed(SSH2Transport tp,
                          SSH2Preferences ourPrefs,
                          SSH2Preferences peerPrefs)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when key exchange have agreed on algorithms. That is when a KEXINIT message has been received and processed).

  Specified by:
    `kexAgreed` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `ourPrefs` - our preferences
    `peerPrefs` - peer's preferences

### kexAuthenticateHost

    public boolean kexAuthenticateHost(SSH2Transport tp,
                                       SSH2Signature serverHostKey)

  Description copied from interface: `SSH2TransportEventHandler`
  Called to authenticate server's host key.

  Specified by:
    `kexAuthenticateHost` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `serverHostKey` - server's host key
  Returns:
    a boolean indicating if the server could be authenticated or not.

### kexComplete

    public void kexComplete(SSH2Transport tp)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when key exchange has been successfully completed. That is when new keys and algorithms are now active.

  Specified by:
    `kexComplete` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer

### msgDebug

    public void msgDebug(SSH2Transport tp,
                         boolean alwaysDisplay,
                         java.lang.String message,
                         java.lang.String languageTag)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when a DEBUG message is received.

  Specified by:
    `msgDebug` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `alwaysDisplay` - boolean flag indicating whether this message should always be displayed or not.
    `message` - debug message contained in the packet
    `languageTag` - language tag

### msgIgnore

    public void msgIgnore(SSH2Transport tp,
                          byte[] data)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when an IGNORE message is received.

  Specified by:
    `msgIgnore` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `data` - byte array of data contained in packet

### msgUnimplemented

    public void msgUnimplemented(SSH2Transport tp,
                                 int rejectedSeqNum)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when an UNIMPLEMENTED message is received.

  Specified by:
    `msgUnimplemented` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `rejectedSeqNum` - sequence number of packet which peer didn't understnad

### peerSentUnknownMessage

    public void peerSentUnknownMessage(SSH2Transport tp,
                                       int pktType)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when an unimplemented message is received, and an UNIMPLEMENTED message is sent to peer.

  Specified by:
    `peerSentUnknownMessage` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `pktType` - type of message which we didn't understand

### normalDisconnect

    public void normalDisconnect(SSH2Transport tp,
                                 java.lang.String description,
                                 java.lang.String languageTag)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when transport layer is disconnected gracefully by our side of connection.

  Specified by:
    `normalDisconnect` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `description` - textual description for reason of disconnect
    `languageTag` - language tag

### fatalDisconnect

    public void fatalDisconnect(SSH2Transport tp,
                                int reason,
                                java.lang.String description,
                                java.lang.String languageTag)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when transport layer is disconnected for the given fatal reason by our side of the connection. See the class `SSH2` for reason codes.

  Specified by:
    `fatalDisconnect` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `reason` - the reason code
    `description` - textual description for reason of disconnect
    `languageTag` - language tag
  See Also:
    `SSH2`

### peerDisconnect

    public void peerDisconnect(SSH2Transport tp,
                               int reason,
                               java.lang.String description,
                               java.lang.String languageTag)

  Description copied from interface: `SSH2TransportEventHandler`
  Called when peer disconnects the transport layer for some given reason. See the class `SSH2` for reason codes.

  Specified by:
    `peerDisconnect` in interface `SSH2TransportEventHandler`
  Parameters:
    `tp` - the transport layer
    `reason` - the reason code
    `description` - textual description for reason of disconnect
    `languageTag` - language tag
  See Also:
    `SSH2`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD