public abstract class AbstractFactoryManager extends AbstractKexFactoryManager implements FactoryManager
AbstractCloseable.State
SignatureFactoriesManager.Utils
Modifier and Type | Field and Description |
---|---|
protected SshAgentFactory |
agentFactory |
protected List<NamedFactory<Channel>> |
channelFactories |
protected ChannelListener |
channelListenerProxy |
protected Collection<ChannelListener> |
channelListeners |
protected ScheduledExecutorService |
executor |
protected FileSystemFactory |
fileSystemFactory |
protected List<RequestHandler<ConnectionService>> |
globalRequestHandlers |
protected IoServiceFactory |
ioServiceFactory |
protected IoServiceFactoryFactory |
ioServiceFactoryFactory |
protected Factory<Random> |
randomFactory |
protected List<ServiceFactory> |
serviceFactories |
protected SessionListener |
sessionListenerProxy |
protected Collection<SessionListener> |
sessionListeners |
protected SessionTimeoutListener |
sessionTimeoutListener |
protected boolean |
shutdownExecutor |
protected TcpipForwarderFactory |
tcpipForwarderFactory |
protected ForwardingFilter |
tcpipForwardingFilter |
protected ScheduledFuture<?> |
timeoutListenerFuture |
closeFuture, lock, state
log
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_MAX_PACKET_SIZE, DEFAULT_NIO_WORKERS, DEFAULT_REKEY_BYTES_LIMIT, DEFAULT_REKEY_PACKETS_LIMIT, DEFAULT_REKEY_TIME_LIMIT, DEFAULT_VERSION, DEFAULT_WINDOW_SIZE, DEFAULT_WINDOW_TIMEOUT, DISCONNECT_TIMEOUT, IDLE_TIMEOUT, IGNORE_MESSAGE_FREQUENCY, IGNORE_MESSAGE_SIZE, IGNORE_MESSAGE_VARIANCE, MAX_PACKET_SIZE, NIO_WORKERS, NIO2_READ_BUFFER_SIZE, REKEY_BLOCKS_LIMIT, REKEY_BYTES_LIMIT, REKEY_PACKETS_LIMIT, REKEY_TIME_LIMIT, SOCKET_BACKLOG, SOCKET_KEEPALIVE, SOCKET_LINGER, SOCKET_RCVBUF, SOCKET_REUSEADDR, SOCKET_SNDBUF, TCP_NODELAY, WINDOW_SIZE, WINDOW_TIMEOUT
Modifier | Constructor and Description |
---|---|
protected |
AbstractFactoryManager() |
getCipherFactories, getCompressionFactories, getKeyExchangeFactories, getKeyPairProvider, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKeyExchangeFactories, setKeyPairProvider, setMacFactories, setSignatureFactories
doCloseGracefully, doCloseImmediately, getInnerCloseable
builder, close, isClosed, isClosing, preClose
close, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCipherFactories, getCompressionFactories, getKeyExchangeFactories, getMacFactories, setCipherFactories, setCompressionFactories, setKeyExchangeFactories, setMacFactories
getKeyPairProvider, setKeyPairProvider
getSignatureFactories, setSignatureFactories
protected IoServiceFactoryFactory ioServiceFactoryFactory
protected IoServiceFactory ioServiceFactory
protected List<NamedFactory<Channel>> channelFactories
protected SshAgentFactory agentFactory
protected ScheduledExecutorService executor
protected boolean shutdownExecutor
protected TcpipForwarderFactory tcpipForwarderFactory
protected ForwardingFilter tcpipForwardingFilter
protected FileSystemFactory fileSystemFactory
protected List<ServiceFactory> serviceFactories
protected List<RequestHandler<ConnectionService>> globalRequestHandlers
protected SessionTimeoutListener sessionTimeoutListener
protected ScheduledFuture<?> timeoutListenerFuture
protected final Collection<SessionListener> sessionListeners
protected final SessionListener sessionListenerProxy
protected final Collection<ChannelListener> channelListeners
protected final ChannelListener channelListenerProxy
public IoServiceFactory getIoServiceFactory()
getIoServiceFactory
in interface FactoryManager
public IoServiceFactoryFactory getIoServiceFactoryFactory()
public void setIoServiceFactoryFactory(IoServiceFactoryFactory ioServiceFactory)
public Factory<Random> getRandomFactory()
FactoryManager
Random
factory to be used.getRandomFactory
in interface FactoryManager
Random
factory, never null
public Map<String,Object> getProperties()
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, the toString()
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 a long
then it will be parsed into one. Also, if
the mapped value is an Integer
but a long
is expected,
then it will be converted into one.
getProperties
in interface PropertyResolver
Map
containing configuration values, never null
public PropertyResolver getParentPropertyResolver()
getParentPropertyResolver
in interface PropertyResolver
null
if no parentpublic String getVersion()
FactoryManager
SSHD-1.0
getVersion
in interface FactoryManager
public List<NamedFactory<Channel>> getChannelFactories()
FactoryManager
Channel
objects.getChannelFactories
in interface FactoryManager
Channel
factories, never null
public void setChannelFactories(List<NamedFactory<Channel>> channelFactories)
public int getNioWorkers()
public void setNioWorkers(int nioWorkers)
public SshAgentFactory getAgentFactory()
FactoryManager
SshAgent
objects.getAgentFactory
in interface FactoryManager
public void setAgentFactory(SshAgentFactory agentFactory)
public ScheduledExecutorService getScheduledExecutorService()
FactoryManager
ScheduledExecutorService
to be used.getScheduledExecutorService
in interface FactoryManager
ScheduledExecutorService
, never null
public void setScheduledExecutorService(ScheduledExecutorService executor)
public void setScheduledExecutorService(ScheduledExecutorService executor, boolean shutdownExecutor)
public TcpipForwarderFactory getTcpipForwarderFactory()
FactoryManager
getTcpipForwarderFactory
in interface FactoryManager
TcpipForwarderFactory
public void setTcpipForwarderFactory(TcpipForwarderFactory tcpipForwarderFactory)
public ForwardingFilter getTcpipForwardingFilter()
FactoryManager
ForwardingFilter
to be used by the SSH server.
If no filter has been configured (i.e. this method returns
null
), then all forwarding requests will be rejected.getTcpipForwardingFilter
in interface FactoryManager
ForwardingFilter
or null
public void setTcpipForwardingFilter(ForwardingFilter tcpipForwardingFilter)
public FileSystemFactory getFileSystemFactory()
FactoryManager
FileSystemFactory
to be used to traverse the file system.getFileSystemFactory
in interface FactoryManager
FileSystemFactory
object or null
if file based
interactions are not supported on this serverpublic void setFileSystemFactory(FileSystemFactory fileSystemFactory)
public List<ServiceFactory> getServiceFactories()
FactoryManager
Service
factories.getServiceFactories
in interface FactoryManager
Service
factories, never null
public void setServiceFactories(List<ServiceFactory> serviceFactories)
public List<RequestHandler<ConnectionService>> getGlobalRequestHandlers()
FactoryManager
getGlobalRequestHandlers
in interface FactoryManager
GlobalRequestHandler
public void setGlobalRequestHandlers(List<RequestHandler<ConnectionService>> globalRequestHandlers)
public void addSessionListener(SessionListener listener)
SessionListenerManager
addSessionListener
in interface SessionListenerManager
listener
- The SessionListener
to add - not null
public void removeSessionListener(SessionListener listener)
SessionListenerManager
removeSessionListener
in interface SessionListenerManager
listener
- The SessionListener
to removepublic SessionListener getSessionListenerProxy()
getSessionListenerProxy
in interface SessionListenerManager
null
proxy SessionListener
that represents
all the currently registered listeners. Any method invocation on the proxy
is replicated to the currently registered listenerspublic void addChannelListener(ChannelListener listener)
ChannelListenerManager
addChannelListener
in interface ChannelListenerManager
listener
- The ChannelListener
to add - not null
public void removeChannelListener(ChannelListener listener)
ChannelListenerManager
removeChannelListener
in interface ChannelListenerManager
listener
- The ChannelListener
to removepublic ChannelListener getChannelListenerProxy()
getChannelListenerProxy
in interface ChannelListenerManager
null
proxy ChannelListener
that represents
all the currently registered listeners. Any method invocation on the proxy
is replicated to the currently registered listenersprotected void setupSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
protected void removeSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
protected SessionTimeoutListener createSessionTimeoutListener()
protected void stopSessionTimeoutListener(AbstractSessionFactory<?,?> sessionFactory)
protected void checkConfig()
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.