Note
the associated username for the session may be null/empty if the
session is not yet authenticated
| Modifier and Type | Method and Description |
|---|---|
| public default Buffer | Returns: a new buffer (of unknown size) ready for writethe SSH command cmd)Create a new buffer for the specified SSH packet and reserve the needed space (5 bytes) for the packet header. |
| public Buffer | Returns: a new buffer ready for writeThe SSH command to initialize the buffer with cmd, int Estimated number of bytes the buffer will hold, 0 if unknown. estimatedSize)Create a new buffer for the specified SSH packet and reserve the needed space (5 bytes) for the packet header. |
| public void | disconnect(int
the reason code for this disconnect reason, String the text message msg)Send a disconnect packet with the given reason and message. |
| public void | exceptionCaught(Throwable
the exception to process t)Handle any exceptions that occurred on this session. |
| public Duration | |
| public Instant | |
| public Duration | |
| public Instant | |
| public IoSession | |
| public KeyExchange | |
| public default SocketAddress | |
| public default SocketAddress | |
| public < The generic T extends Service> TService type | Returns: The service instanceThe service class clazz)Get the service of the specified type. |
| public TimeoutIndicator | |
| public Buffer | Returns: The initialized bufferThe SSH command to initialize the buffer with cmd, Buffer The buffer)Buffer instance to initializePrepare a new "clean" buffer while reserving the needed space (5 bytes) for the packet header. |
| public KeyExchangeFuture | Returns: AKeyExchangeFuture for awaiting the completion of the exchangeInitiate a new key exchange. |
| public default Buffer | Returns: the return buffer if the request was successful,null otherwise.the request name - used mainly for logging and debugging request, Buffer the buffer containing the global request buffer, long The number of time units to wait - must be positive timeout, TimeUnit The unit)TimeUnit to wait for the responseSend a global request and wait for the response, if the request is sent with |
| public default Buffer | Returns: the return buffer if the request was successful,null otherwise.the request name - used mainly for logging and debugging request, Buffer the buffer containing the global request buffer, Duration The (never timeout)null) timeout to wait - its milliseconds value is usedSend a global request and wait for the response, if the request is sent with |
| public Buffer | Returns: the return buffer if the request was successful,null otherwise.the request name - used mainly for logging and debugging request, Buffer the buffer containing the global request buffer, long maximum time in milliseconds to wait for the request to finish - must be
positive maxWaitMillis)Send a global request and wait for the response, if the request is sent with |
| public GlobalRequestFuture | Returns: CreatedGlobalRequestFuturethe buffer, String Buffer containing the global request, with the want-reply flag set as
appropriatethe request name request, GlobalRequestFuture.ReplyHandler for handling the reply; may be nullSend a global request and handle the reply asynchronously. |
| public Instant | Returns: The timestamp value (milliseconds since EPOCH) when timer was startedRe-start the authentication timeout timer |
| public Instant | Returns: The timestamp value (milliseconds since EPOCH) when timer was startedRe-start idle timeout timer |
| public default <T> T | resolveAttribute(AttributeRepository.
The key of the attribute; must not be keynull.Overrides default org. Attempts to resolve the associated value by going up the store's hierarchy (if any) |
| public static < The generic attribute type T> T | Returns: Associated value -null if not foundThe session, AttributeRepository.Session - ignored if nullThe attribute key - never keynullAttempts to use the session's attribute, if not found then tries the factory manager |
| public IoWriteFuture | Returns: AnIoWriteFuture that can be used to check when the packet has actually been senttrue if OK to display the message at the peer as-isThe message object whose msg, String toString() value to be used - if null then the
"null" string is sentThe language - lang)null/empty if some pre-agreed default is usedSends an |
| public IoWriteFuture | Returns: AnIoWriteFuture that can be used to check when the packet has actually been sentThe message data data)Sends an |
| public void | |
| public void | startService(String
Service name name, Buffer Extra information provided when the service start request was received buffer)
|
| public IoWriteFuture | Returns: AnIoWriteFuture that can be used to check when the packet has actually been sentthe buffer to encode and send buffer)Encode and send the given buffer. |
| public default IoWriteFuture | Returns: a future that can be used to check when the packet has actually been sentthe buffer to encode and spend buffer, Duration the (never timeout)null) timeout value - its milliseconds value
will be usedEncode and send the given buffer with the specified timeout. |
| public default IoWriteFuture | Returns: a future that can be used to check when the packet has actually been sentthe buffer to encode and spend buffer, long the timeout in milliseconds maxWaitMillis)Encode and send the given buffer with the specified timeout. |
| public IoWriteFuture | Returns: a future that can be used to check when the packet has actually been sentthe buffer to encode and spend buffer, long the timeout timeout, TimeUnit the time unit of the timeout parameter unit)Encode and send the given buffer with the specified timeout. |
| createBuffer | back to summary |
|---|---|
| public default Buffer createBuffer(byte cmd) Create a new buffer for the specified SSH packet and reserve the needed space (5 bytes) for the packet header.
| |
| createBuffer | back to summary |
|---|---|
| public Buffer createBuffer(byte cmd, int estimatedSize) Create a new buffer for the specified SSH packet and reserve the needed space (5 bytes) for the packet header.
| |
| disconnect | back to summary |
|---|---|
| public void disconnect(int reason, String msg) throws IOException Send a disconnect packet with the given reason and message. Once the packet has been sent, the session will be closed asynchronously.
| |
| exceptionCaught | back to summary |
|---|---|
| public void exceptionCaught(Throwable t) Handle any exceptions that occurred on this session. The session will be closed and a disconnect packet will be
sent before if the given exception is an
| |
| getAuthTimeout | back to summary |
|---|---|
public Duration getAuthTimeout()
| |
| getAuthTimeoutStart | back to summary |
|---|---|
public Instant getAuthTimeoutStart()
| |
| getIdleTimeout | back to summary |
|---|---|
public Duration getIdleTimeout()
| |
| getIdleTimeoutStart | back to summary |
|---|---|
public Instant getIdleTimeoutStart()
| |
| getIoSession | back to summary |
|---|---|
| public IoSession getIoSession() | |
| getKex | back to summary |
|---|---|
public KeyExchange getKex()
| |
| getLocalAddress | back to summary |
|---|---|
| public default SocketAddress getLocalAddress() Implements org.
| |
| getRemoteAddress | back to summary |
|---|---|
| public default SocketAddress getRemoteAddress() Implements org.
| |
| getService | back to summary |
|---|---|
| public <T extends Service> T getService(Class<T> clazz) Get the service of the specified type. If the service is not of the specified class, an IllegalStateException will be thrown.
| |
| getTimeoutStatus | back to summary |
|---|---|
| public TimeoutIndicator getTimeoutStatus() Check if timeout has occurred.
| |
| prepareBuffer | back to summary |
|---|---|
| public Buffer prepareBuffer(byte cmd, Buffer buffer) Prepare a new "clean" buffer while reserving the needed space (5 bytes) for the packet header. | |
| reExchangeKeys | back to summary |
|---|---|
| public KeyExchangeFuture reExchangeKeys() throws IOException Initiate a new key exchange.
| |
| request | back to summary |
|---|---|
| public default Buffer request(String request, Buffer buffer, long timeout, TimeUnit unit) throws IOException Send a global request and wait for the response, if the request is sent with
| |
| request | back to summary |
|---|---|
| public default Buffer request(String request, Buffer buffer, Duration timeout) throws IOException Send a global request and wait for the response, if the request is sent with
| |
| request | back to summary |
|---|---|
| public Buffer request(String request, Buffer buffer, long maxWaitMillis) throws IOException Send a global request and wait for the response, if the request is sent with
| |
| request | back to summary |
|---|---|
| public GlobalRequestFuture request(Buffer buffer, String request, GlobalRequestFuture. Send a global request and handle the reply asynchronously. If
| |
| resetAuthTimeout | back to summary |
|---|---|
| public Instant resetAuthTimeout() Re-start the authentication timeout timer
| |
| resetIdleTimeout | back to summary |
|---|---|
| public Instant resetIdleTimeout() Re-start idle timeout timer
| |
| resolveAttribute | back to summary |
|---|---|
| public default <T> T resolveAttribute(AttributeRepository. Overrides default org. Doc from org. Attempts to resolve the associated value by going up the store's hierarchy (if any)
| |
| resolveAttribute | back to summary |
|---|---|
| public static <T> T resolveAttribute(Session session, AttributeRepository. Attempts to use the session's attribute, if not found then tries the factory manager
| |
| sendDebugMessage | back to summary |
|---|---|
| public IoWriteFuture sendDebugMessage(boolean display, Object msg, String lang) throws IOException Sends an
| |
| sendIgnoreMessage | back to summary |
|---|---|
| public IoWriteFuture sendIgnoreMessage(byte... data) throws IOException Sends an
| |
| setAuthenticated | back to summary |
|---|---|
| public void setAuthenticated() throws IOException | |
| startService | back to summary |
|---|---|
| public void startService(String name, Buffer buffer) throws Exception | |
| writePacket | back to summary |
|---|---|
| public IoWriteFuture writePacket(Buffer buffer) throws IOException Encode and send the given buffer. The buffer has to have 5 bytes free at the beginning to allow the encoding to take place. Also, the write position of the buffer has to be set to the position of the last byte to write.
| |
| writePacket | back to summary |
|---|---|
| public default IoWriteFuture writePacket(Buffer buffer, Duration timeout) throws IOException Encode and send the given buffer with the specified timeout. If the buffer could not be written before the
timeout elapses, the returned
| |
| writePacket | back to summary |
|---|---|
| public default IoWriteFuture writePacket(Buffer buffer, long maxWaitMillis) throws IOException Encode and send the given buffer with the specified timeout. If the buffer could not be written before the
timeout elapses, the returned
| |
| writePacket | back to summary |
|---|---|
| public IoWriteFuture writePacket(Buffer buffer, long timeout, TimeUnit unit) throws IOException Encode and send the given buffer with the specified timeout. If the buffer could not be written before the
timeout elapses, the returned
| |