com.mindbright.ssh2
public class SSH2RetryingTCPChannel extends SSH2TCPChannel
SSH2TCPChannel which retries the open if
it fails.endpoint, originAddr, originPort, remoteAddr, remotePortin, log, nbin, nbout, out, receiver, rxCounter, rxQueue, transmitter, txCounterchannelId, channelType, closeListeners, closeReceived, closeSent, connection, creator, deleted, eofReceived, eofSent, openMonitor, openStatus, peerChanId, rxCurrWinSz, rxInitWinSz, rxMaxPktSz, STATUS_CLOSED, STATUS_FAILED, STATUS_OPEN, STATUS_UNDEFINED, txCurrWinSz, txInitWinSz, txMaxPktSz| Constructor and Description |
|---|
SSH2RetryingTCPChannel(int channelType,
SSH2Connection connection,
java.lang.Object creator,
java.net.Socket endpoint,
java.lang.String remoteAddr,
int remotePort,
java.lang.String originAddr,
int originPort)
Create a new retrying tcp channel of the given type.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
openFailureImpl(int reasonCode,
java.lang.String reasonText,
java.lang.String langTag)
Channel specific handling of open failures.
|
protected void |
setRetries(int numOfRetries)
Set number of retries to do.
|
void |
setRetryDelay(long retryDelayTime)
Set delay between retries.
|
getAddress, getOriginAddress, getOriginPort, getPort, getRemoteAddress, getRemotePort, outputClosed, toStringapplyFilter, checkRxWindowSize, closeImpl, completed, connected, connectionFailed, createStreams, data, eofImpl, handleRequestImpl, openConfirmationImpl, readFailed, startStreams, waitUntilClosed, waitUntilClosed, windowAdjustImpl, writeFailedaddCloseListener, close, extData, getChannelId, getConnection, getCreator, getPeerId, getType, handleRequest, init, openConfirmation, openFailure, openStatus, recvClose, recvEOF, removeCloseListener, requestFailure, requestSuccess, sendClose, sendEOF, transmit, windowAdjustpublic SSH2RetryingTCPChannel(int channelType,
SSH2Connection connection,
java.lang.Object creator,
java.net.Socket endpoint,
java.lang.String remoteAddr,
int remotePort,
java.lang.String originAddr,
int originPort)
throws java.io.IOException
SSH2Connection and starts with
CH_TYPE.channelType - Type of channel to create.connection - The ssh connection to associate the channel with.creator - The object the channel is created from.endpoint - Socket the channel is connected to at the local end.remoteAddr - Remote server to connect to.remotePort - Remote port to connect to.originAddr - Originating host of local connection.originPort - Originating port of local connection.java.io.IOExceptionprotected void setRetries(int numOfRetries)
numOfRetries - Number of retries.public void setRetryDelay(long retryDelayTime)
retryDelayTime - Delay in seconds.protected boolean openFailureImpl(int reasonCode,
java.lang.String reasonText,
java.lang.String langTag)
SSH2ChannelopenFailureImpl in class SSH2TCPChannelreasonCode - Code which tells why the open failed. See the
ssh protocol drafts for values.reasonText - A text explaining why the open failed.langTag - Tag identifying the language of the reason text.