Package org.apache.sshd.agent.local
Class AgentForwardedChannel
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.Channel
,ClientChannel
,ClientSessionHolder
,AttributeRepository
,AttributeStore
,Channel
,ChannelListenerManager
,ChannelStreamPacketWriterResolver
,ChannelStreamPacketWriterResolverManager
,Closeable
,PacketWriter
,PropertyResolver
,SessionContextHolder
,SessionHolder<Session>
,ExecutorServiceCarrier
public class AgentForwardedChannel extends AbstractClientChannel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sshd.common.channel.AbstractChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState
-
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
AbstractCloseable.State
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.AttributeRepository
AttributeRepository.AttributeKey<T>
-
Nested classes/interfaces inherited from interface org.apache.sshd.client.channel.ClientChannel
ClientChannel.Streaming
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_MESSAGE_POLL_FREQUENCY
Default value for "agent-fwd-channel-message-poll-time"static java.lang.String
MESSAGE_POLL_FREQUENCY
Time to wait for new incoming messages before checking if the channel is still activeprivate java.util.Queue<Buffer>
messages
private Buffer
receiveBuffer
-
Fields inherited from class org.apache.sshd.client.channel.AbstractClientChannel
asyncErr, asyncIn, asyncOut, err, exitSignalHolder, exitStatusHolder, in, invertedErr, invertedIn, invertedOut, opened, openFailureLang, openFailureMsg, openFailureReason, openFuture, out, streaming
-
Fields inherited from class org.apache.sshd.common.channel.AbstractChannel
channelListenerProxy, channelListeners, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, service
-
Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, state
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.channel.Channel
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM
-
Fields inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolver
NONE
-
Fields inherited from interface org.apache.sshd.common.Closeable
CLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT
-
Fields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY
-
-
Constructor Summary
Constructors Constructor Description AgentForwardedChannel(java.lang.String channelType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doOpen()
protected void
doWriteData(byte[] data, int off, long len)
SshAgent
getAgent()
protected Buffer
request(Buffer buffer)
protected Buffer
waitForMessageBuffer()
-
Methods inherited from class org.apache.sshd.client.channel.AbstractClientChannel
addChannelSignalRequestHandlers, doWriteExtendedData, getAsyncErr, getAsyncIn, getAsyncOut, getChannelState, getChannelType, getErr, getExitSignal, getExitStatus, getIn, getInnerCloseable, getInvertedErr, getInvertedIn, getInvertedOut, getOut, getStreaming, handleOpenFailure, handleOpenSuccess, handleWindowAdjust, open, open, setErr, setIn, setOut, setStreaming, updateCurrentChannelState, waitFor
-
Methods inherited from class org.apache.sshd.common.channel.AbstractChannel
addChannelListener, addPendingRequest, addRequestHandler, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, getAttribute, getAttributesCount, getChannelListenerProxy, getChannelStreamPacketWriterResolver, getExecutorService, getId, getLocalWindow, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRequest, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleInternalRequest, handleRequest, handleSuccess, handleUnknownChannelRequest, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamPacketWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamPacketWriterResolver, setRecipient, signalChannelClosed, signalChannelClosed, signalChannelInitialized, signalChannelInitialized, signalChannelOpenFailure, signalChannelOpenFailure, signalChannelOpenSuccess, signalChannelOpenSuccess, toString, validateIncomingDataSize, writePacket
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediately
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListener
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.AttributeRepository
attributeKeys, getAttribute, getAttributesCount
-
Methods inherited from interface org.apache.sshd.common.AttributeStore
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
-
Methods inherited from interface org.apache.sshd.common.channel.Channel
addRequestHandler, addRequestHandlers, getId, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlers, resolveAttribute
-
Methods inherited from interface org.apache.sshd.common.channel.ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListener
-
Methods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolverManager
getChannelStreamPacketWriterResolver, resolveChannelStreamPacketWriter, resolveChannelStreamPacketWriterResolver, setChannelStreamPacketWriterResolver
-
Methods inherited from interface org.apache.sshd.client.channel.ClientChannel
getClientSession
-
Methods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Methods inherited from interface org.apache.sshd.common.io.PacketWriter
writePacket
-
Methods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSession, getSessionContext
-
-
-
-
Field Detail
-
MESSAGE_POLL_FREQUENCY
public static final java.lang.String MESSAGE_POLL_FREQUENCY
Time to wait for new incoming messages before checking if the channel is still active- See Also:
- Constant Field Values
-
DEFAULT_MESSAGE_POLL_FREQUENCY
public static final long DEFAULT_MESSAGE_POLL_FREQUENCY
Default value for "agent-fwd-channel-message-poll-time"
-
messages
private final java.util.Queue<Buffer> messages
-
receiveBuffer
private final Buffer receiveBuffer
-
-
Method Detail
-
getAgent
public SshAgent getAgent()
-
request
protected Buffer request(Buffer buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
waitForMessageBuffer
protected Buffer waitForMessageBuffer() throws java.io.IOException
- Throws:
java.io.IOException
-
doOpen
protected void doOpen() throws java.io.IOException
- Specified by:
doOpen
in classAbstractClientChannel
- Throws:
java.io.IOException
-
doWriteData
protected void doWriteData(byte[] data, int off, long len) throws java.io.IOException
- Overrides:
doWriteData
in classAbstractClientChannel
- Throws:
java.io.IOException
-
-