public interface StatefulProxyConnector
extends org.apache.sshd.client.session.ClientProxyConnector
ClientProxyConnector
has only
support for sending a message; replies get routed through the Ssh session,
and don't get back to this proxy connector. Augment the interface so that the
session can know when to route messages received to the proxy connector, and
when to start handling them itself.Modifier and Type | Field and Description |
---|---|
static String |
TIMEOUT_PROPERTY
A property key for a session property defining the timeout for setting up
the proxy connection.
|
Modifier and Type | Method and Description |
---|---|
void |
messageReceived(org.apache.sshd.common.io.IoSession session,
org.apache.sshd.common.util.Readable buffer)
Handle a received message.
|
void |
runWhenDone(Callable<Void> command)
Runs
command once the proxy connection is established. |
static final String TIMEOUT_PROPERTY
void messageReceived(org.apache.sshd.common.io.IoSession session, org.apache.sshd.common.util.Readable buffer) throws Exception
session
- to use for writing databuffer
- received dataException
- if data cannot be read, or the connection attempt failsvoid runWhenDone(Callable<Void> command) throws Exception
command
once the proxy connection is established. May be
called multiple times; commands are run sequentially. If the proxy
connection is already established, command
is executed directly
synchronously.command
- operation to runException
- if the operation is run synchronously and throws an exceptionCopyright © 2019 Eclipse JGit Project. All rights reserved.