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.- 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
FieldsModifier and TypeFieldDescriptionprotected ScheduledFuture<?>
Non-null only if using the "keep-alive" request mechanismprotected final Duration
protected final Duration
protected final String
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 -
Method Summary
Modifier and TypeMethodDescriptionfinal ClientSession
protected boolean
Sends a heartbeat message/packetvoid
start()
protected ScheduledFuture<?>
protected void
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 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:
getClientSession
in interfaceClientSessionHolder
- Returns:
- The underlying
ClientSession
used
-
getSession
- Specified by:
getSession
in interfaceSessionHolder<Session>
- Overrides:
getSession
in classAbstractConnectionService
-
start
public void start()- Specified by:
start
in interfaceService
- Overrides:
start
in classAbstractConnectionService
-
startHeartBeat
- Overrides:
startHeartBeat
in classAbstractConnectionService
-
stopHeartBeat
protected void stopHeartBeat()- Overrides:
stopHeartBeat
in classAbstractConnectionService
-
sendHeartBeat
protected boolean sendHeartBeat()Description copied from class:AbstractConnectionService
Sends a heartbeat message/packet- Overrides:
sendHeartBeat
in classAbstractConnectionService
- Returns:
true
if heartbeat successfully sent
-
getAgentForwardSupport
- Specified by:
getAgentForwardSupport
in interfaceConnectionService
- Overrides:
getAgentForwardSupport
in classAbstractConnectionService
-
getX11ForwardSupport
- Specified by:
getX11ForwardSupport
in interfaceConnectionService
- Overrides:
getX11ForwardSupport
in classAbstractConnectionService
-