Package org.apache.sshd.client.session
Class ClientConnectionService
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.util.closeable.IoBaseCloseable
-
- org.apache.sshd.common.util.closeable.AbstractCloseable
-
- org.apache.sshd.common.util.closeable.AbstractInnerCloseable
-
- org.apache.sshd.common.session.helpers.AbstractConnectionService
-
- org.apache.sshd.client.session.ClientConnectionService
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ClientSessionHolder,Closeable,PortForwardingEventListenerManager,PortForwardingEventListenerManagerHolder,PropertyResolver,Service,ConnectionService,SessionContextHolder,SessionHeartbeatController,SessionHolder<Session>,UnknownChannelReferenceHandlerManager
public class ClientConnectionService extends AbstractConnectionService implements ClientSessionHolder
Client sidessh-connectionservice.- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
-
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.session.SessionHeartbeatController
SessionHeartbeatController.HeartbeatType
-
-
Field Summary
Fields Modifier and Type Field Description protected ScheduledFuture<?>clientHeartbeatNon-null only if using the "keep-alive" request mechanismprotected DurationheartbeatIntervalprotected DurationheartbeatReplyMaxWaitprotected StringheartbeatRequest-
Fields inherited from class org.apache.sshd.common.session.helpers.AbstractConnectionService
channels, DEFAULT_SESSION_IGNORE_HEARTBEAT_STRING, heartbeatCount, nextChannelId, RESPONSE_BUFFER_GROWTH_FACTOR
-
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.PropertyResolver
EMPTY
-
-
Constructor Summary
Constructors Constructor Description ClientConnectionService(AbstractClientSession s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentForwardSupportgetAgentForwardSupport()ClientSessiongetClientSession()AbstractClientSessiongetSession()X11ForwardSupportgetX11ForwardSupport()protected booleansendHeartBeat()Sends a heartbeat message/packetvoidstart()protected ScheduledFuture<?>startHeartBeat()protected voidstopHeartBeat()-
Methods inherited from class org.apache.sshd.common.session.helpers.AbstractConnectionService
addPortForwardingEventListener, addPortForwardingEventListenerManager, channelClose, channelData, channelEof, channelExtendedData, channelFailure, channelOpen, channelOpenConfirmation, channelOpenFailure, channelRequest, channelSuccess, channelWindowAdjust, createAgentForwardSupport, createForwardingFilter, createX11ForwardSupport, futureDone, getChannel, getChannel, getChannels, getForwarder, getInnerCloseable, getNextChannelId, getPortForwardingEventListenerProxy, getProperties, getRegisteredManagers, getUnknownChannelReferenceHandler, globalRequest, handleUnknownRequest, isAllowMoreSessions, preClose, process, registerChannel, removePortForwardingEventListener, removePortForwardingEventListenerManager, requestFailure, requestSuccess, resolveUnknownChannelReferenceHandler, sendChannelOpenFailure, sendGlobalResponse, setAllowMoreSessions, setUnknownChannelReferenceHandler, toString, unregisterChannel
-
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.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, getString, getStringProperty, isEmpty
-
Methods inherited from interface org.apache.sshd.common.Service
getParentPropertyResolver
-
Methods inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
disableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeat, setSessionHeartbeat
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Field Detail
-
heartbeatRequest
protected final String heartbeatRequest
-
heartbeatInterval
protected final Duration heartbeatInterval
-
heartbeatReplyMaxWait
protected final Duration heartbeatReplyMaxWait
-
clientHeartbeat
protected ScheduledFuture<?> clientHeartbeat
Non-null only if using the "keep-alive" request mechanism
-
-
Constructor Detail
-
ClientConnectionService
public ClientConnectionService(AbstractClientSession s) throws SshException
- Throws:
SshException
-
-
Method Detail
-
getClientSession
public final ClientSession getClientSession()
- Specified by:
getClientSessionin interfaceClientSessionHolder- Returns:
- The underlying
ClientSessionused
-
getSession
public AbstractClientSession getSession()
- Specified by:
getSessionin interfaceSessionHolder<Session>- Overrides:
getSessionin classAbstractConnectionService
-
start
public void start()
- Specified by:
startin interfaceService- Overrides:
startin classAbstractConnectionService
-
startHeartBeat
protected ScheduledFuture<?> startHeartBeat()
- Overrides:
startHeartBeatin classAbstractConnectionService
-
stopHeartBeat
protected void stopHeartBeat()
- Overrides:
stopHeartBeatin classAbstractConnectionService
-
sendHeartBeat
protected boolean sendHeartBeat()
Description copied from class:AbstractConnectionServiceSends a heartbeat message/packet- Overrides:
sendHeartBeatin classAbstractConnectionService- Returns:
trueif heartbeat successfully sent
-
getAgentForwardSupport
public AgentForwardSupport getAgentForwardSupport()
- Specified by:
getAgentForwardSupportin interfaceConnectionService- Overrides:
getAgentForwardSupportin classAbstractConnectionService
-
getX11ForwardSupport
public X11ForwardSupport getX11ForwardSupport()
- Specified by:
getX11ForwardSupportin interfaceConnectionService- Overrides:
getX11ForwardSupportin classAbstractConnectionService
-
-