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-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
Fields Modifier and Type Field Description protected ScheduledFuture<?>
clientHeartbeat
Non-null only if using the "keep-alive" request mechanismprotected Duration
heartbeatInterval
protected Duration
heartbeatReplyMaxWait
protected String
heartbeatRequest
-
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 AgentForwardSupport
getAgentForwardSupport()
ClientSession
getClientSession()
AbstractClientSession
getSession()
X11ForwardSupport
getX11ForwardSupport()
protected boolean
sendHeartBeat()
Sends a heartbeat message/packetvoid
start()
protected ScheduledFuture<?>
startHeartBeat()
protected void
stopHeartBeat()
-
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:
getClientSession
in interfaceClientSessionHolder
- Returns:
- The underlying
ClientSession
used
-
getSession
public AbstractClientSession 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
protected ScheduledFuture<?> 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
public AgentForwardSupport getAgentForwardSupport()
- Specified by:
getAgentForwardSupport
in interfaceConnectionService
- Overrides:
getAgentForwardSupport
in classAbstractConnectionService
-
getX11ForwardSupport
public X11ForwardSupport getX11ForwardSupport()
- Specified by:
getX11ForwardSupport
in interfaceConnectionService
- Overrides:
getX11ForwardSupport
in classAbstractConnectionService
-
-