| java.lang.Object | |
| ↳ | net.schmizz.sshj.transport.TransportImpl |
A thread-safe Transport implementation.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| authed | |||||||||||
| clientID | Client version identification string | ||||||||||
| close | |||||||||||
| config | |||||||||||
| connInfo | |||||||||||
| decoder | |||||||||||
| disconnectListener | |||||||||||
| encoder | |||||||||||
| heartbeater | |||||||||||
| kexer | |||||||||||
| log | |||||||||||
| msg | Message identifier of last packet received | ||||||||||
| nullDisconnectListener | |||||||||||
| nullService | |||||||||||
| reader | |||||||||||
| serverID | Server version identification string | ||||||||||
| service | Currently active service e.g. | ||||||||||
| serviceAccept | |||||||||||
| timeout | |||||||||||
| writeLock | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds the specified verifier.
| |||||||||||
Send a disconnect packet with the given
reason and message, and closes this
transport. | |||||||||||
Send a disconnection packet with reason as
BY_APPLICATION, and closes this transport. | |||||||||||
Send a disconnect packet with the given
reason, and closes this transport. | |||||||||||
Do key exchange and algorithm negotiation.
| |||||||||||
Returns the version string as sent by the SSH server for identification purposes, e.g.
| |||||||||||
This is where all incoming packets are handled.
| |||||||||||
Sets the host information and the streams to be used by this transport.
| |||||||||||
Joins the thread calling this method to the transport's death.
| |||||||||||
Joins the thread calling this method to the transport's death.
| |||||||||||
Request a SSH service represented by a
Service instance. | |||||||||||
Sends SSH_MSG_UNIMPLEMENTED in response to the last packet received.
| |||||||||||
Informs this transport that authentication has been completed.
| |||||||||||
Specify a
listener that will be notified upon disconnection. | |||||||||||
Sets the currently active
Service. | |||||||||||
Set a timeout for methods that may block.
| |||||||||||
Write a packet over this transport.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
net.schmizz.sshj.common.SSHPacketHandler
| |||||||||||
From interface
net.schmizz.sshj.transport.Transport
| |||||||||||
Client version identification string
Server version identification string
Adds the specified verifier.
| hkv | The host key verifier |
|---|
Send a disconnect packet with the given reason and message, and closes this
transport.
| reason | The reason code for this disconnect |
|---|---|
| message | The text message |
Send a disconnection packet with reason as BY_APPLICATION, and closes this transport.
Send a disconnect packet with the given reason, and closes this transport.
| reason | Reason for disconnecting |
|---|
Do key exchange and algorithm negotiation. This can be the initial one or for algorithm renegotiation.
| TransportException |
|---|
Returns the version string as sent by the SSH server for identification purposes, e.g. "OpenSSH_$version".
If the transport has not yet been initialized viainit(String, int, InputStream, OutputStream), it will be null.null)
This is where all incoming packets are handled. If they pertain to the transport layer, they are handled here;
otherwise they are delegated to the active service instance if any via handle(Message, SSHPacket).
| msg | The message identifer |
|---|---|
| buf | Buffer containg rest of the packet |
| SSHException | if an error occurs during handling (unrecoverable) |
|---|
Sets the host information and the streams to be used by this transport. Identification information is exchanged
with the server. A TransportException is thrown in case of SSH protocol version incompatibility.
| remoteHost | Server's hostname |
|---|---|
| remotePort | Server's port |
| in | Input stream for the connection |
| out | Output stream for the connection |
| TransportException |
|---|
Joins the thread calling this method to the transport's death.
| timeout | |
|---|---|
| unit |
| TransportException |
|---|
Joins the thread calling this method to the transport's death.
| TransportException |
|---|
Request a SSH service represented by a Service instance. A separate call to setService(Service) is not
needed.
| service | The SSH service to be requested |
|---|
| TransportException |
|---|
Sends SSH_MSG_UNIMPLEMENTED in response to the last packet received.
| TransportException |
|---|
Informs this transport that authentication has been completed. This method must be called after successful authentication, so that delayed compression may become effective if applicable.
Specify a listener that will be notified upon disconnection.
| listener |
|---|
| interval |
|---|
Sets the currently active Service. Handling of non-transport-layer packets is delegated to that service.
reqService(Service) must have been successful
(not necessarily for the service being set).| service | (null-ok) the Service
|
|---|
Set a timeout for methods that may block.
| timeout | The timeout in seconds |
|---|
Write a packet over this transport.
Thepayload SSHPacket should have 5 bytes free at the beginning to avoid a performance penalty
associated with making space for header bytes (packet length, padding length).| payload | The SSHPacket containing data to send |
|---|
| TransportException |
|---|