Class AbstractFactoryManager
- 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.kex.AbstractKexFactoryManager
-
- org.apache.sshd.common.helpers.AbstractFactoryManager
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.Channel
,AttributeRepository
,AttributeStore
,ChannelListenerManager
,ChannelStreamPacketWriterResolver
,ChannelStreamPacketWriterResolverManager
,Closeable
,FactoryManager
,PortForwardingEventListenerManager
,IoServiceEventListenerManager
,KexExtensionHandlerManager
,KexFactoryManager
,PropertyResolver
,ReservedSessionMessagesManager
,SessionDisconnectHandlerManager
,SessionHeartbeatController
,SessionListenerManager
,UnknownChannelReferenceHandlerManager
,SignatureFactoriesManager
public abstract class AbstractFactoryManager extends AbstractKexFactoryManager implements FactoryManager
-
-
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.AttributeRepository
AttributeRepository.AttributeKey<T>
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
SessionHeartbeatController.HeartbeatType
-
-
Field Summary
-
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.throttle.ChannelStreamPacketWriterResolver
NONE
-
Fields inherited from interface org.apache.sshd.common.Closeable
CLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT
-
Fields inherited from interface org.apache.sshd.common.FactoryManager
AGENT_FORWARDING_TYPE, AGENT_FORWARDING_TYPE_IETF, AGENT_FORWARDING_TYPE_OPENSSH, AUTH_TIMEOUT, CHANNEL_CLOSE_TIMEOUT, DEFAULT_AUTH_TIMEOUT, DEFAULT_CHANNEL_CLOSE_TIMEOUT, DEFAULT_DISCONNECT_TIMEOUT, DEFAULT_IDLE_TIMEOUT, DEFAULT_IGNORE_MESSAGE_FREQUENCY, DEFAULT_IGNORE_MESSAGE_SIZE, DEFAULT_IGNORE_MESSAGE_VARIANCE, DEFAULT_LIMIT_PACKET_SIZE, DEFAULT_MAX_IDENTIFICATION_SIZE, DEFAULT_MAX_PACKET_SIZE, DEFAULT_NIO_WORKERS, DEFAULT_NIO2_MIN_WRITE_TIMEOUT, DEFAULT_NIO2_READ_TIMEOUT, DEFAULT_REKEY_BYTES_LIMIT, DEFAULT_REKEY_PACKETS_LIMIT, DEFAULT_REKEY_TIME_LIMIT, DEFAULT_STOP_WAIT_TIME, DEFAULT_VERSION, DEFAULT_WINDOW_SIZE, DEFAULT_WINDOW_TIMEOUT, DISCONNECT_TIMEOUT, IDLE_TIMEOUT, IGNORE_MESSAGE_FREQUENCY, IGNORE_MESSAGE_SIZE, IGNORE_MESSAGE_VARIANCE, LIMIT_PACKET_SIZE, MAX_IDENTIFICATION_SIZE, MAX_PACKET_SIZE, NIO_WORKERS, NIO2_MIN_WRITE_TIMEOUT, NIO2_READ_BUFFER_SIZE, NIO2_READ_TIMEOUT, REKEY_BLOCKS_LIMIT, REKEY_BYTES_LIMIT, REKEY_PACKETS_LIMIT, REKEY_TIME_LIMIT, SOCKET_BACKLOG, SOCKET_KEEPALIVE, SOCKET_LINGER, SOCKET_RCVBUF, SOCKET_REUSEADDR, SOCKET_SNDBUF, STOP_WAIT_TIME, TCP_NODELAY, WINDOW_SIZE, WINDOW_TIMEOUT
-
Fields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY
-
Fields inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
DEFAULT_CONNECTION_HEARTBEAT_INTERVAL, SESSION_HEARTBEAT_INTERVAL, SESSION_HEARTBEAT_TYPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFactoryManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChannelListener(ChannelListener listener)
Add a channel listenervoid
addPortForwardingEventListener(PortForwardingEventListener listener)
Add a port forwarding listenervoid
addSessionListener(SessionListener listener)
Add a session listener.java.util.Collection<AttributeRepository.AttributeKey<?>>
attributeKeys()
protected void
checkConfig()
void
clearAttributes()
Removes all currently stored user-defined attributes<T> T
computeAttributeIfAbsent(AttributeRepository.AttributeKey<T> key, java.util.function.Function<? super AttributeRepository.AttributeKey<T>,? extends T> resolver)
If the specified key is not already associated with a value (or is mapped tonull
), attempts to compute its value using the given mapping function and enters it into this map unlessnull
.protected SessionTimeoutListener
createSessionTimeoutListener()
SshAgentFactory
getAgentFactory()
Retrieve the agent factory for creatingSshAgent
objects.<T> T
getAttribute(AttributeRepository.AttributeKey<T> key)
Returns the value of the user-defined attribute.int
getAttributesCount()
java.util.List<ChannelFactory>
getChannelFactories()
Retrieve the list of named factories forChannel
objects.ChannelListener
getChannelListenerProxy()
ChannelStreamPacketWriterResolver
getChannelStreamPacketWriterResolver()
FileSystemFactory
getFileSystemFactory()
Retrieve theFileSystemFactory
to be used to traverse the file system.ForwardingFilterFactory
getForwarderFactory()
Retrieve the forwarder factory used to support forwarding.ForwardingFilter
getForwardingFilter()
Retrieve theForwardingFilter
to be used by the SSH server.java.util.List<RequestHandler<ConnectionService>>
getGlobalRequestHandlers()
Retrieve the list of global request handlers.IoServiceEventListener
getIoServiceEventListener()
IoServiceFactory
getIoServiceFactory()
IoServiceFactoryFactory
getIoServiceFactoryFactory()
int
getNioWorkers()
PropertyResolver
getParentPropertyResolver()
PortForwardingEventListener
getPortForwardingEventListenerProxy()
java.util.Map<java.lang.String,java.lang.Object>
getProperties()
A map of properties that can be used to configure the SSH server or client.Factory<Random>
getRandomFactory()
Retrieve theRandom
factory to be used.ReservedSessionMessagesHandler
getReservedSessionMessagesHandler()
java.util.concurrent.ScheduledExecutorService
getScheduledExecutorService()
Retrieve theScheduledExecutorService
to be used.java.util.List<ServiceFactory>
getServiceFactories()
Retrieve the list of SSHService
factories.SessionDisconnectHandler
getSessionDisconnectHandler()
SessionListener
getSessionListenerProxy()
UnknownChannelReferenceHandler
getUnknownChannelReferenceHandler()
java.lang.String
getVersion()
An upper case string identifying the version of the software used on client or server side.<T> T
removeAttribute(AttributeRepository.AttributeKey<T> key)
Removes the user-defined attributevoid
removeChannelListener(ChannelListener listener)
Remove a channel listenervoid
removePortForwardingEventListener(PortForwardingEventListener listener)
Remove a port forwarding listenervoid
removeSessionListener(SessionListener listener)
Remove a session listener.protected void
removeSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
UnknownChannelReferenceHandler
resolveUnknownChannelReferenceHandler()
Check if current manager has a specific handler set for it - if not, try and resolve one from the "parent" container (if any)void
setAgentFactory(SshAgentFactory agentFactory)
<T> T
setAttribute(AttributeRepository.AttributeKey<T> key, T value)
Sets a user-defined attribute.void
setChannelFactories(java.util.List<ChannelFactory> channelFactories)
void
setChannelStreamPacketWriterResolver(ChannelStreamPacketWriterResolver resolver)
void
setFileSystemFactory(FileSystemFactory fileSystemFactory)
void
setForwarderFactory(ForwardingFilterFactory forwarderFactory)
void
setForwardingFilter(ForwardingFilter forwardingFilter)
void
setGlobalRequestHandlers(java.util.List<RequestHandler<ConnectionService>> globalRequestHandlers)
void
setIoServiceEventListener(IoServiceEventListener listener)
void
setIoServiceFactoryFactory(IoServiceFactoryFactory ioServiceFactory)
void
setNioWorkers(int nioWorkers)
void
setParentPropertyResolver(PropertyResolver parent)
void
setRandomFactory(Factory<Random> randomFactory)
void
setReservedSessionMessagesHandler(ReservedSessionMessagesHandler handler)
void
setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor)
void
setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor, boolean shutdownExecutor)
void
setServiceFactories(java.util.List<ServiceFactory> serviceFactories)
void
setSessionDisconnectHandler(SessionDisconnectHandler sessionDisconnectHandler)
void
setUnknownChannelReferenceHandler(UnknownChannelReferenceHandler unknownChannelReferenceHandler)
protected void
setupSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
protected void
stopSessionTimeoutListener(AbstractSessionFactory<?,?> sessionFactory)
-
Methods inherited from class org.apache.sshd.common.kex.AbstractKexFactoryManager
getCipherFactories, getCompressionFactories, getDelegate, getKexExtensionHandler, getKeyExchangeFactories, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKexExtensionHandler, setKeyExchangeFactories, setMacFactories, setSignatureFactories
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediately, getInnerCloseable
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListener
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolverManager
resolveChannelStreamPacketWriter, resolveChannelStreamPacketWriterResolver
-
Methods inherited from interface org.apache.sshd.common.FactoryManager
getAgentForwardingFilter, getTcpForwardingFilter, getX11ForwardingFilter, resolveAttribute
-
Methods inherited from interface org.apache.sshd.common.kex.extension.KexExtensionHandlerManager
getKexExtensionHandler, setKexExtensionHandler
-
Methods inherited from interface org.apache.sshd.common.kex.KexFactoryManager
getCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNames
-
Methods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getString, getStringProperty
-
Methods inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
disableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeat
-
Methods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesManager
getSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNames, setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNames
-
-
-
-
Field Detail
-
ioServiceFactoryFactory
protected IoServiceFactoryFactory ioServiceFactoryFactory
-
ioServiceFactory
protected IoServiceFactory ioServiceFactory
-
channelFactories
protected java.util.List<ChannelFactory> channelFactories
-
agentFactory
protected SshAgentFactory agentFactory
-
executor
protected java.util.concurrent.ScheduledExecutorService executor
-
shutdownExecutor
protected boolean shutdownExecutor
-
forwarderFactory
protected ForwardingFilterFactory forwarderFactory
-
forwardingFilter
protected ForwardingFilter forwardingFilter
-
fileSystemFactory
protected FileSystemFactory fileSystemFactory
-
serviceFactories
protected java.util.List<ServiceFactory> serviceFactories
-
globalRequestHandlers
protected java.util.List<RequestHandler<ConnectionService>> globalRequestHandlers
-
sessionTimeoutListener
protected SessionTimeoutListener sessionTimeoutListener
-
timeoutListenerFuture
protected java.util.concurrent.ScheduledFuture<?> timeoutListenerFuture
-
sessionListeners
protected final java.util.Collection<SessionListener> sessionListeners
-
sessionListenerProxy
protected final SessionListener sessionListenerProxy
-
channelListeners
protected final java.util.Collection<ChannelListener> channelListeners
-
channelListenerProxy
protected final ChannelListener channelListenerProxy
-
tunnelListeners
protected final java.util.Collection<PortForwardingEventListener> tunnelListeners
-
tunnelListenerProxy
protected final PortForwardingEventListener tunnelListenerProxy
-
properties
private final java.util.Map<java.lang.String,java.lang.Object> properties
-
attributes
private final java.util.Map<AttributeRepository.AttributeKey<?>,java.lang.Object> attributes
-
parentResolver
private PropertyResolver parentResolver
-
reservedSessionMessagesHandler
private ReservedSessionMessagesHandler reservedSessionMessagesHandler
-
sessionDisconnectHandler
private SessionDisconnectHandler sessionDisconnectHandler
-
channelStreamPacketWriterResolver
private ChannelStreamPacketWriterResolver channelStreamPacketWriterResolver
-
unknownChannelReferenceHandler
private UnknownChannelReferenceHandler unknownChannelReferenceHandler
-
eventListener
private IoServiceEventListener eventListener
-
-
Method Detail
-
getIoServiceFactory
public IoServiceFactory getIoServiceFactory()
- Specified by:
getIoServiceFactory
in interfaceFactoryManager
-
getIoServiceFactoryFactory
public IoServiceFactoryFactory getIoServiceFactoryFactory()
-
setIoServiceFactoryFactory
public void setIoServiceFactoryFactory(IoServiceFactoryFactory ioServiceFactory)
-
getIoServiceEventListener
public IoServiceEventListener getIoServiceEventListener()
- Specified by:
getIoServiceEventListener
in interfaceIoServiceEventListenerManager
-
setIoServiceEventListener
public void setIoServiceEventListener(IoServiceEventListener listener)
- Specified by:
setIoServiceEventListener
in interfaceIoServiceEventListenerManager
-
getRandomFactory
public Factory<Random> getRandomFactory()
Description copied from interface:FactoryManager
Retrieve theRandom
factory to be used.- Specified by:
getRandomFactory
in interfaceFactoryManager
- Returns:
- The
Random
factory, nevernull
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Description copied from interface:PropertyResolver
A map of properties that can be used to configure the SSH server or client. This map will never be changed by either the server or client and is not supposed to be changed at runtime (changes are not bound to have any effect on a running client or server), though it may affect the creation of sessions later as these values are usually not cached.
Note: the type of the mapped property should match the expected configuration value type -
Long, Integer, Boolean, String
, etc.... If it doesn't, thetoString()
result of the mapped value is used to convert it to the required type. E.g., if the mapped value is the string "1234" and the expected value is along
then it will be parsed into one. Also, if the mapped value is anInteger
but along
is expected, then it will be converted into one.- Specified by:
getProperties
in interfacePropertyResolver
- Returns:
- a valid
Map
containing configuration values, nevernull
. Note: may be immutable.
-
getAttributesCount
public int getAttributesCount()
- Specified by:
getAttributesCount
in interfaceAttributeRepository
- Returns:
- Current number of user-defined attributes stored in the repository
-
getAttribute
public <T> T getAttribute(AttributeRepository.AttributeKey<T> key)
Description copied from interface:AttributeRepository
Returns the value of the user-defined attribute.- Specified by:
getAttribute
in interfaceAttributeRepository
- Type Parameters:
T
- The generic attribute type- Parameters:
key
- The key of the attribute; must not benull
.- Returns:
null
if there is no value associated with the specified key
-
attributeKeys
public java.util.Collection<AttributeRepository.AttributeKey<?>> attributeKeys()
- Specified by:
attributeKeys
in interfaceAttributeRepository
- Returns:
- A
Collection
snapshot of all the currently registered attributes in the repository
-
computeAttributeIfAbsent
public <T> T computeAttributeIfAbsent(AttributeRepository.AttributeKey<T> key, java.util.function.Function<? super AttributeRepository.AttributeKey<T>,? extends T> resolver)
Description copied from interface:AttributeStore
If the specified key is not already associated with a value (or is mapped tonull
), attempts to compute its value using the given mapping function and enters it into this map unlessnull
.- Specified by:
computeAttributeIfAbsent
in interfaceAttributeStore
- Type Parameters:
T
- The generic attribute type- Parameters:
key
- The key of the attribute; must not benull
.resolver
- The (nevernull
) mapping function to use if value not already mapped. If returnsnull
then value is not mapped to the provided key.- Returns:
- The resolved value -
null
if value not mapped and resolver did not return a non-null
value for it
-
setAttribute
public <T> T setAttribute(AttributeRepository.AttributeKey<T> key, T value)
Description copied from interface:AttributeStore
Sets a user-defined attribute.- Specified by:
setAttribute
in interfaceAttributeStore
- Type Parameters:
T
- The generic attribute type- Parameters:
key
- The key of the attribute; must not benull
.value
- The value of the attribute; must not benull
.- Returns:
- The old value of the attribute;
null
if it is new.
-
removeAttribute
public <T> T removeAttribute(AttributeRepository.AttributeKey<T> key)
Description copied from interface:AttributeStore
Removes the user-defined attribute- Specified by:
removeAttribute
in interfaceAttributeStore
- Type Parameters:
T
- The generic attribute type- Parameters:
key
- The key of the attribute; must not benull
.- Returns:
- The removed value;
null
if no previous value
-
clearAttributes
public void clearAttributes()
Description copied from interface:AttributeStore
Removes all currently stored user-defined attributes- Specified by:
clearAttributes
in interfaceAttributeStore
-
getParentPropertyResolver
public PropertyResolver getParentPropertyResolver()
- Specified by:
getParentPropertyResolver
in interfacePropertyResolver
- Returns:
- The parent resolver that can be used to query for missing
properties -
null
if no parent
-
setParentPropertyResolver
public void setParentPropertyResolver(PropertyResolver parent)
-
getVersion
public java.lang.String getVersion()
Description copied from interface:FactoryManager
An upper case string identifying the version of the software used on client or server side. This version includes the name and version of the software and usually looks like this:SSHD-CORE-1.0
- Specified by:
getVersion
in interfaceFactoryManager
- Returns:
- the version of the software
-
getChannelFactories
public java.util.List<ChannelFactory> getChannelFactories()
Description copied from interface:FactoryManager
Retrieve the list of named factories forChannel
objects.- Specified by:
getChannelFactories
in interfaceFactoryManager
- Returns:
- A list of
ChannelFactory
-ies, nevernull
-
setChannelFactories
public void setChannelFactories(java.util.List<ChannelFactory> channelFactories)
-
getNioWorkers
public int getNioWorkers()
-
setNioWorkers
public void setNioWorkers(int nioWorkers)
-
getAgentFactory
public SshAgentFactory getAgentFactory()
Description copied from interface:FactoryManager
Retrieve the agent factory for creatingSshAgent
objects.- Specified by:
getAgentFactory
in interfaceFactoryManager
- Returns:
- The
SshAgentFactory
-
setAgentFactory
public void setAgentFactory(SshAgentFactory agentFactory)
-
getScheduledExecutorService
public java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
Description copied from interface:FactoryManager
Retrieve theScheduledExecutorService
to be used.- Specified by:
getScheduledExecutorService
in interfaceFactoryManager
- Returns:
- The
ScheduledExecutorService
, nevernull
-
setScheduledExecutorService
public void setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor)
-
setScheduledExecutorService
public void setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor, boolean shutdownExecutor)
-
getForwarderFactory
public ForwardingFilterFactory getForwarderFactory()
Description copied from interface:FactoryManager
Retrieve the forwarder factory used to support forwarding.- Specified by:
getForwarderFactory
in interfaceFactoryManager
- Returns:
- The
ForwardingFilterFactory
-
setForwarderFactory
public void setForwarderFactory(ForwardingFilterFactory forwarderFactory)
-
getForwardingFilter
public ForwardingFilter getForwardingFilter()
Description copied from interface:FactoryManager
Retrieve theForwardingFilter
to be used by the SSH server. If no filter has been configured (i.e. this method returnsnull
), then all forwarding requests will be rejected.- Specified by:
getForwardingFilter
in interfaceFactoryManager
- Returns:
- The
ForwardingFilter
ornull
-
setForwardingFilter
public void setForwardingFilter(ForwardingFilter forwardingFilter)
-
getFileSystemFactory
public FileSystemFactory getFileSystemFactory()
Description copied from interface:FactoryManager
Retrieve theFileSystemFactory
to be used to traverse the file system.- Specified by:
getFileSystemFactory
in interfaceFactoryManager
- Returns:
- a valid
FileSystemFactory
instance ornull
if file based interactions are not supported on this server
-
setFileSystemFactory
public void setFileSystemFactory(FileSystemFactory fileSystemFactory)
-
getServiceFactories
public java.util.List<ServiceFactory> getServiceFactories()
Description copied from interface:FactoryManager
Retrieve the list of SSHService
factories.- Specified by:
getServiceFactories
in interfaceFactoryManager
- Returns:
- a list of named
Service
factories, nevernull
-
setServiceFactories
public void setServiceFactories(java.util.List<ServiceFactory> serviceFactories)
-
getGlobalRequestHandlers
public java.util.List<RequestHandler<ConnectionService>> getGlobalRequestHandlers()
Description copied from interface:FactoryManager
Retrieve the list of global request handlers.- Specified by:
getGlobalRequestHandlers
in interfaceFactoryManager
- Returns:
- a list of named
GlobalRequestHandler
-
setGlobalRequestHandlers
public void setGlobalRequestHandlers(java.util.List<RequestHandler<ConnectionService>> globalRequestHandlers)
-
getReservedSessionMessagesHandler
public ReservedSessionMessagesHandler getReservedSessionMessagesHandler()
- Specified by:
getReservedSessionMessagesHandler
in interfaceReservedSessionMessagesManager
- Returns:
- The currently registered
ReservedSessionMessagesHandler
- may benull
-
setReservedSessionMessagesHandler
public void setReservedSessionMessagesHandler(ReservedSessionMessagesHandler handler)
- Specified by:
setReservedSessionMessagesHandler
in interfaceReservedSessionMessagesManager
- Parameters:
handler
- TheReservedSessionMessagesHandler
to use - may benull
-
getSessionDisconnectHandler
public SessionDisconnectHandler getSessionDisconnectHandler()
- Specified by:
getSessionDisconnectHandler
in interfaceSessionDisconnectHandlerManager
-
setSessionDisconnectHandler
public void setSessionDisconnectHandler(SessionDisconnectHandler sessionDisconnectHandler)
- Specified by:
setSessionDisconnectHandler
in interfaceSessionDisconnectHandlerManager
-
getChannelStreamPacketWriterResolver
public ChannelStreamPacketWriterResolver getChannelStreamPacketWriterResolver()
- Specified by:
getChannelStreamPacketWriterResolver
in interfaceChannelStreamPacketWriterResolverManager
-
setChannelStreamPacketWriterResolver
public void setChannelStreamPacketWriterResolver(ChannelStreamPacketWriterResolver resolver)
- Specified by:
setChannelStreamPacketWriterResolver
in interfaceChannelStreamPacketWriterResolverManager
-
getUnknownChannelReferenceHandler
public UnknownChannelReferenceHandler getUnknownChannelReferenceHandler()
- Specified by:
getUnknownChannelReferenceHandler
in interfaceUnknownChannelReferenceHandlerManager
- Returns:
- The
UnknownChannelReferenceHandlerManager
to use - ifnull
then any reference to unknown channel causes anSshChannelNotFoundException
-
setUnknownChannelReferenceHandler
public void setUnknownChannelReferenceHandler(UnknownChannelReferenceHandler unknownChannelReferenceHandler)
- Specified by:
setUnknownChannelReferenceHandler
in interfaceUnknownChannelReferenceHandlerManager
- Parameters:
unknownChannelReferenceHandler
- TheUnknownChannelReferenceHandlerManager
to use - ifnull
then any reference to unknown channel causes anSshChannelNotFoundException
-
resolveUnknownChannelReferenceHandler
public UnknownChannelReferenceHandler resolveUnknownChannelReferenceHandler()
Description copied from interface:UnknownChannelReferenceHandlerManager
Check if current manager has a specific handler set for it - if not, try and resolve one from the "parent" container (if any)- Specified by:
resolveUnknownChannelReferenceHandler
in interfaceUnknownChannelReferenceHandlerManager
- Returns:
- The resolved handler instance
-
addSessionListener
public void addSessionListener(SessionListener listener)
Description copied from interface:SessionListenerManager
Add a session listener.- Specified by:
addSessionListener
in interfaceSessionListenerManager
- Parameters:
listener
- TheSessionListener
to add - notnull
-
removeSessionListener
public void removeSessionListener(SessionListener listener)
Description copied from interface:SessionListenerManager
Remove a session listener.- Specified by:
removeSessionListener
in interfaceSessionListenerManager
- Parameters:
listener
- TheSessionListener
to remove
-
getSessionListenerProxy
public SessionListener getSessionListenerProxy()
- Specified by:
getSessionListenerProxy
in interfaceSessionListenerManager
- Returns:
- A (never
null
proxySessionListener
that represents all the currently registered listeners. Any method invocation on the proxy is replicated to the currently registered listeners
-
addChannelListener
public void addChannelListener(ChannelListener listener)
Description copied from interface:ChannelListenerManager
Add a channel listener- Specified by:
addChannelListener
in interfaceChannelListenerManager
- Parameters:
listener
- TheChannelListener
to add - notnull
-
removeChannelListener
public void removeChannelListener(ChannelListener listener)
Description copied from interface:ChannelListenerManager
Remove a channel listener- Specified by:
removeChannelListener
in interfaceChannelListenerManager
- Parameters:
listener
- TheChannelListener
to remove
-
getChannelListenerProxy
public ChannelListener getChannelListenerProxy()
- Specified by:
getChannelListenerProxy
in interfaceChannelListenerManager
- Returns:
- A (never
null
proxyChannelListener
that represents all the currently registered listeners. Any method invocation on the proxy is replicated to the currently registered listeners
-
getPortForwardingEventListenerProxy
public PortForwardingEventListener getPortForwardingEventListenerProxy()
- Specified by:
getPortForwardingEventListenerProxy
in interfacePortForwardingEventListenerManager
- Returns:
- A proxy listener representing all the currently registered listener through this manager
-
addPortForwardingEventListener
public void addPortForwardingEventListener(PortForwardingEventListener listener)
Description copied from interface:PortForwardingEventListenerManager
Add a port forwarding listener- Specified by:
addPortForwardingEventListener
in interfacePortForwardingEventListenerManager
- Parameters:
listener
- ThePortForwardingEventListener
to add - nevernull
-
removePortForwardingEventListener
public void removePortForwardingEventListener(PortForwardingEventListener listener)
Description copied from interface:PortForwardingEventListenerManager
Remove a port forwarding listener- Specified by:
removePortForwardingEventListener
in interfacePortForwardingEventListenerManager
- Parameters:
listener
- ThePortForwardingEventListener
to remove - ignored ifnull
-
setupSessionTimeout
protected void setupSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
-
removeSessionTimeout
protected void removeSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
-
createSessionTimeoutListener
protected SessionTimeoutListener createSessionTimeoutListener()
-
stopSessionTimeoutListener
protected void stopSessionTimeoutListener(AbstractSessionFactory<?,?> sessionFactory)
-
checkConfig
protected void checkConfig()
-
-