public abstract class AbstractFactoryManager extends AbstractKexFactoryManager implements FactoryManager
AbstractCloseable.StateAttributeStore.AttributeKey<T>closeFuture, lock, statelogAUTH_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_TIMEOUTEMPTYCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFactoryManager() |
getCipherFactories, getCompressionFactories, getKeyExchangeFactories, getKeyPairProvider, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKeyExchangeFactories, setKeyPairProvider, setMacFactories, setSignatureFactoriesdoCloseGracefully, doCloseImmediately, getInnerCloseableaddCloseFutureListener, builder, close, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNamesgetKeyPairProvider, setKeyPairProvidergetSignatureFactories, getSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNames, resolveSignatureFactories, setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNamesresolveAttribute, resolveAttribute, resolveAttributegetBoolean, getBooleanProperty, getInteger, getIntProperty, getLong, getLongProperty, getObject, getString, getStringPropertyclose, close, getMaxCloseWaitTime, isOpenprotected 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
protected final Collection<PortForwardingEventListener> tunnelListeners
protected final PortForwardingEventListener tunnelListenerProxy
public IoServiceFactory getIoServiceFactory()
getIoServiceFactory in interface FactoryManagerpublic IoServiceFactoryFactory getIoServiceFactoryFactory()
public void setIoServiceFactoryFactory(IoServiceFactoryFactory ioServiceFactory)
public Factory<Random> getRandomFactory()
FactoryManagerRandom factory to be used.getRandomFactory in interface FactoryManagerRandom factory, never nullpublic Map<String,Object> getProperties()
PropertyResolverA 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 PropertyResolverMap containing configuration values, never
nullpublic <T> T getAttribute(AttributeStore.AttributeKey<T> key)
AttributeStoregetAttribute in interface AttributeStoreT - The generic attribute typekey - The key of the attribute; must not be null.public <T> T setAttribute(AttributeStore.AttributeKey<T> key, T value)
AttributeStoresetAttribute in interface AttributeStoreT - The generic attribute typekey - The key of the attribute; must not be null.value - The value of the attribute; must not be null.null if it is new.public <T> T removeAttribute(AttributeStore.AttributeKey<T> key)
AttributeStoreremoveAttribute in interface AttributeStoreT - The generic attribute typekey - The key of the attribute; must not be null.null if no previous valuepublic <T> T resolveAttribute(AttributeStore.AttributeKey<T> key)
AttributeStoreresolveAttribute in interface AttributeStoreT - The generic attribute typekey - The key of the attribute; must not be null.public PropertyResolver getParentPropertyResolver()
getParentPropertyResolver in interface PropertyResolvernull if no parentpublic void setParentPropertyResolver(PropertyResolver parent)
public String getVersion()
FactoryManagerSSHD-CORE-1.0getVersion in interface FactoryManagerpublic List<NamedFactory<Channel>> getChannelFactories()
FactoryManagerChannel objects.getChannelFactories in interface FactoryManagerChannel factories, never nullpublic void setChannelFactories(List<NamedFactory<Channel>> channelFactories)
public int getNioWorkers()
public void setNioWorkers(int nioWorkers)
public SshAgentFactory getAgentFactory()
FactoryManagerSshAgent objects.getAgentFactory in interface FactoryManagerSshAgentFactorypublic void setAgentFactory(SshAgentFactory agentFactory)
public ScheduledExecutorService getScheduledExecutorService()
FactoryManagerScheduledExecutorService to be used.getScheduledExecutorService in interface FactoryManagerScheduledExecutorService, never nullpublic void setScheduledExecutorService(ScheduledExecutorService executor)
public void setScheduledExecutorService(ScheduledExecutorService executor, boolean shutdownExecutor)
public TcpipForwarderFactory getTcpipForwarderFactory()
FactoryManagergetTcpipForwarderFactory in interface FactoryManagerTcpipForwarderFactorypublic void setTcpipForwarderFactory(TcpipForwarderFactory tcpipForwarderFactory)
public ForwardingFilter getTcpipForwardingFilter()
FactoryManagerForwardingFilter 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 FactoryManagerForwardingFilter or nullpublic void setTcpipForwardingFilter(ForwardingFilter tcpipForwardingFilter)
public FileSystemFactory getFileSystemFactory()
FactoryManagerFileSystemFactory to be used to traverse the file system.getFileSystemFactory in interface FactoryManagerFileSystemFactory instance or null if file based
interactions are not supported on this serverpublic void setFileSystemFactory(FileSystemFactory fileSystemFactory)
public List<ServiceFactory> getServiceFactories()
FactoryManagerService factories.getServiceFactories in interface FactoryManagerService factories, never nullpublic void setServiceFactories(List<ServiceFactory> serviceFactories)
public List<RequestHandler<ConnectionService>> getGlobalRequestHandlers()
FactoryManagergetGlobalRequestHandlers in interface FactoryManagerGlobalRequestHandlerpublic void setGlobalRequestHandlers(List<RequestHandler<ConnectionService>> globalRequestHandlers)
public ReservedSessionMessagesHandler getReservedSessionMessagesHandler()
getReservedSessionMessagesHandler in interface ReservedSessionMessagesManagerReservedSessionMessagesHandler - may be nullpublic void setReservedSessionMessagesHandler(ReservedSessionMessagesHandler handler)
setReservedSessionMessagesHandler in interface ReservedSessionMessagesManagerhandler - The ReservedSessionMessagesHandler to use - may be nullpublic void addSessionListener(SessionListener listener)
SessionListenerManageraddSessionListener in interface SessionListenerManagerlistener - The SessionListener to add - not nullpublic void removeSessionListener(SessionListener listener)
SessionListenerManagerremoveSessionListener in interface SessionListenerManagerlistener - The SessionListener to removepublic SessionListener getSessionListenerProxy()
getSessionListenerProxy in interface SessionListenerManagernull 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)
ChannelListenerManageraddChannelListener in interface ChannelListenerManagerlistener - The ChannelListener to add - not nullpublic void removeChannelListener(ChannelListener listener)
ChannelListenerManagerremoveChannelListener in interface ChannelListenerManagerlistener - The ChannelListener to removepublic ChannelListener getChannelListenerProxy()
getChannelListenerProxy in interface ChannelListenerManagernull proxy ChannelListener that represents
all the currently registered listeners. Any method invocation on the proxy
is replicated to the currently registered listenerspublic PortForwardingEventListener getPortForwardingEventListenerProxy()
getPortForwardingEventListenerProxy in interface PortForwardingEventListenerManagerpublic void addPortForwardingEventListener(PortForwardingEventListener listener)
PortForwardingEventListenerManageraddPortForwardingEventListener in interface PortForwardingEventListenerManagerlistener - The PortForwardingEventListener to add - never nullpublic void removePortForwardingEventListener(PortForwardingEventListener listener)
PortForwardingEventListenerManagerremovePortForwardingEventListener in interface PortForwardingEventListenerManagerlistener - The PortForwardingEventListener to remove - ignored if nullprotected void setupSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
protected void removeSessionTimeout(AbstractSessionFactory<?,?> sessionFactory)
protected SessionTimeoutListener createSessionTimeoutListener()
protected void stopSessionTimeoutListener(AbstractSessionFactory<?,?> sessionFactory)
protected void checkConfig()
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.