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 side
ssh-connection service.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
AbstractCloseable.StateNested classes/interfaces inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
SessionHeartbeatController.HeartbeatType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ScheduledFuture<?> Non-null only if using the "keep-alive" request mechanismprotected final Durationprotected final Durationprotected final StringFields inherited from class org.apache.sshd.common.session.helpers.AbstractConnectionService
channels, DEFAULT_SESSION_IGNORE_HEARTBEAT_STRING, heartbeatCount, nextChannelId, RESPONSE_BUFFER_GROWTH_FACTORFields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, stateFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ClientSessionprotected booleanSends a heartbeat message/packetvoidstart()protected ScheduledFuture<?> protected voidMethods 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, unregisterChannelMethods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediatelyMethods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListenerMethods 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, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListenerMethods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getString, getStringProperty, isEmptyMethods inherited from interface org.apache.sshd.common.Service
getParentPropertyResolverMethods inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
disableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeat, setSessionHeartbeatMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Field Details
-
heartbeatRequest
-
heartbeatInterval
-
heartbeatReplyMaxWait
-
clientHeartbeat
Non-null only if using the "keep-alive" request mechanism
-
-
Constructor Details
-
ClientConnectionService
- Throws:
SshException
-
-
Method Details
-
getClientSession
- Specified by:
getClientSessionin interfaceClientSessionHolder- Returns:
- The underlying
ClientSessionused
-
getSession
- Specified by:
getSessionin interfaceSessionHolder<Session>- Overrides:
getSessionin classAbstractConnectionService
-
start
public void start()- Specified by:
startin interfaceService- Overrides:
startin classAbstractConnectionService
-
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
- Specified by:
getAgentForwardSupportin interfaceConnectionService- Overrides:
getAgentForwardSupportin classAbstractConnectionService
-
getX11ForwardSupport
- Specified by:
getX11ForwardSupportin interfaceConnectionService- Overrides:
getX11ForwardSupportin classAbstractConnectionService
-