public abstract class AbstractClientProxyConnector extends Object implements StatefulProxyConnector
StatefulProxyConnector.| Modifier and Type | Field and Description |
|---|---|
protected InetSocketAddress |
proxyAddress
The proxy address.
|
protected char[] |
proxyPassword
The password to use for authentication at the proxy.
|
protected String |
proxyUser
The user to authenticate at the proxy with.
|
protected InetSocketAddress |
remoteAddress
The ultimate remote address to connect to.
|
TIMEOUT_PROPERTY| Constructor and Description |
|---|
AbstractClientProxyConnector(InetSocketAddress proxyAddress,
InetSocketAddress remoteAddress,
String proxyUser,
char[] proxyPassword)
Creates a new
AbstractClientProxyConnector. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustTimeout()
Adjusts the timeout calculation to not account of elapsed time since the
last time the timeout was gotten.
|
protected void |
clearPassword()
Clears the proxy password.
|
protected long |
getTimeout()
Obtains the timeout for the whole rest of the proxy connection protocol.
|
protected void |
init(org.apache.sshd.client.session.ClientSession session)
Initializes this instance.
|
void |
runWhenDone(Callable<Void> starter)
Runs
command once the proxy connection is established. |
protected void |
setDone(boolean success)
Sets the "done" flag.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmessageReceivedprotected final InetSocketAddress remoteAddress
protected final InetSocketAddress proxyAddress
protected String proxyUser
protected char[] proxyPassword
public AbstractClientProxyConnector(@NonNull InetSocketAddress proxyAddress, @NonNull InetSocketAddress remoteAddress, String proxyUser, char[] proxyPassword)
AbstractClientProxyConnector.proxyAddress - of the proxy server we're connecting toremoteAddress - of the target server to connect toproxyUser - to authenticate at the proxy with; may be nullproxyPassword - to authenticate at the proxy with; may be nullprotected void init(org.apache.sshd.client.session.ClientSession session)
session - to initialize forprotected long getTimeout()
protected void adjustTimeout()
protected void setDone(boolean success)
throws Exception
success - whether the connector terminated successfully.Exception - if starting ssh failspublic void runWhenDone(Callable<Void> starter) throws Exception
StatefulProxyConnectorcommand 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.runWhenDone in interface StatefulProxyConnectorstarter - operation to runException - if the operation is run synchronously and throws an exceptionprotected void clearPassword()
Copyright © 2020 Eclipse JGit Project. All rights reserved.