Package org.apache.sshd.agent.unix
Class ChannelAgentForwarding
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.Channel
,AttributeRepository
,AttributeStore
,Channel
,ChannelIdentifier
,ChannelListenerManager
,ChannelStreamWriterResolver
,ChannelStreamWriterResolverManager
,Closeable
,PropertyResolver
,SessionContextHolder
,SessionHolder<Session>
,ExecutorServiceCarrier
,ServerChannel
,ServerSessionHolder
public class ChannelAgentForwarding extends AbstractServerChannel
The client side channel that will receive requests forwards by the SSH server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sshd.common.channel.AbstractChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState, AbstractChannel.PacketValidator
-
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>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
authSocket
private java.util.concurrent.Future<?>
forwarder
private CloseableExecutorService
forwardService
private long
handle
private java.io.OutputStream
out
private long
pool
-
Fields inherited from class org.apache.sshd.server.channel.AbstractServerChannel
exitStatusSent
-
Fields inherited from class org.apache.sshd.common.channel.AbstractChannel
channelListenerProxy, channelListeners, closeSignaled, DEFAULT_PACKET_VALIDATOR, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, service, unregisterSignaled
-
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.ChannelStreamWriterResolver
NONE
-
Fields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY
-
-
Constructor Summary
Constructors Constructor Description ChannelAgentForwarding(CloseableExecutorService executor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
closeImmediately0()
protected OpenFuture
doInit(Buffer buffer)
protected void
doWriteData(byte[] data, int off, long len)
protected void
doWriteExtendedData(byte[] data, int off, long len)
protected Closeable
getInnerCloseable()
private static void
throwException(int code)
transform an APR error number in a more fancy exception-
Methods inherited from class org.apache.sshd.server.channel.AbstractServerChannel
handleOpenFailure, handleOpenSuccess, open, sendExitStatus
-
Methods inherited from class org.apache.sshd.common.channel.AbstractChannel
addChannelListener, addPendingRequest, addRequestHandler, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, getAttribute, getAttributesCount, getChannelId, getChannelListenerProxy, getChannelStreamWriterResolver, getExecutorService, getLocalWindow, getPacketValidator, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRegistrationResult, handleChannelRequest, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleInternalRequest, handleRequest, handleSuccess, handleUnknownChannelRequest, handleWindowAdjust, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, mayWrite, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamWriterResolver, setPacketValidator, 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
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
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, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleChannelRegistrationResult, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleWindowAdjust, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlers, resolveAttribute, writePacket
-
Methods inherited from interface org.apache.sshd.common.channel.ChannelIdentifier
getChannelId
-
Methods inherited from interface org.apache.sshd.common.channel.ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListener
-
Methods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolverManager
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolver
-
Methods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Methods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmpty
-
Methods inherited from interface org.apache.sshd.server.channel.ServerChannel
getServerSession
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSession, getSessionContext
-
-
-
-
Field Detail
-
authSocket
private java.lang.String authSocket
-
pool
private long pool
-
handle
private long handle
-
out
private java.io.OutputStream out
-
forwardService
private CloseableExecutorService forwardService
-
forwarder
private java.util.concurrent.Future<?> forwarder
-
-
Constructor Detail
-
ChannelAgentForwarding
public ChannelAgentForwarding(CloseableExecutorService executor)
-
-
Method Detail
-
doInit
protected OpenFuture doInit(Buffer buffer)
- Overrides:
doInit
in classAbstractServerChannel
-
closeImmediately0
private void closeImmediately0()
-
getInnerCloseable
protected Closeable getInnerCloseable()
- Overrides:
getInnerCloseable
in classAbstractChannel
-
doWriteData
protected void doWriteData(byte[] data, int off, long len) throws java.io.IOException
- Specified by:
doWriteData
in classAbstractChannel
- Throws:
java.io.IOException
-
doWriteExtendedData
protected void doWriteExtendedData(byte[] data, int off, long len) throws java.io.IOException
- Specified by:
doWriteExtendedData
in classAbstractChannel
- Throws:
java.io.IOException
-
throwException
private static void throwException(int code) throws java.io.IOException
transform an APR error number in a more fancy exception- Parameters:
code
- APR error code- Throws:
java.io.IOException
- the produced exception for the given APR error number
-
-