public abstract class AbstractFactoryManager extends CloseableUtils.AbstractInnerCloseable implements FactoryManager
CloseableUtils.AbstractCloseable.StatecloseFuture, lock, statelogAUTH_TIMEOUT, CHANNEL_CLOSE_TIMEOUT, DEFAULT_NIO_WORKERS, DEFAULT_VERSION, DISCONNECT_TIMEOUT, IDLE_TIMEOUT, MAX_PACKET_SIZE, NIO_WORKERS, NIO2_READ_BUFFER_SIZE, SOCKET_BACKLOG, SOCKET_KEEPALIVE, SOCKET_LINGER, SOCKET_RCVBUF, SOCKET_REUSEADDR, SOCKET_SNDBUF, TCP_NODELAY, WINDOW_SIZE, WINDOW_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFactoryManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkConfig() |
protected SessionTimeoutListener |
createSessionTimeoutListener() |
SshAgentFactory |
getAgentFactory()
Retrieve the agent factory for creating
SshAgent objects. |
List<NamedFactory<Channel>> |
getChannelFactories()
Retrieve the list of named factories for
Channel objects. |
List<NamedFactory<Cipher>> |
getCipherFactories()
Retrieve the list of named factories for
Cipher. |
List<NamedFactory<Compression>> |
getCompressionFactories()
Retrieve the list of named factories for
Compression. |
FileSystemFactory |
getFileSystemFactory()
Retrieve the
FileSystemFactory to be used to traverse the file system. |
List<RequestHandler<ConnectionService>> |
getGlobalRequestHandlers()
Retrieve the list of global request handlers.
|
IoServiceFactory |
getIoServiceFactory() |
IoServiceFactoryFactory |
getIoServiceFactoryFactory() |
List<NamedFactory<KeyExchange>> |
getKeyExchangeFactories()
Retrieve the list of named factories for
KeyExchange. |
KeyPairProvider |
getKeyPairProvider()
Retrieve the
KeyPairProvider that will be used to find
the host key to use on the server side or the user key on the client side. |
List<NamedFactory<Mac>> |
getMacFactories()
Retrieve the list of named factories for
Mac. |
int |
getNioWorkers() |
Map<String,Object> |
getProperties()
A map of properties that can be used to configure the SSH server
or client.
|
Factory<Random> |
getRandomFactory()
Retrieve the
Random factory to be used. |
ScheduledExecutorService |
getScheduledExecutorService()
Retrieve the
ScheduledExecutorService to be used. |
List<ServiceFactory> |
getServiceFactories()
Retrieve the list of SSH
Service factories. |
List<NamedFactory<Signature>> |
getSignatureFactories()
Retrieve the list of named factories for
Signature. |
TcpipForwarderFactory |
getTcpipForwarderFactory()
Retrieve the tcpip forwarder factory used to support tcpip forwarding.
|
ForwardingFilter |
getTcpipForwardingFilter()
Retrieve the
ForwardingFilter to be used by the SSH server. |
String |
getVersion()
An upper case string identifying the version of the software used on
client or server side.
|
protected void |
removeSessionTimeout(AbstractSessionFactory sessionFactory) |
void |
setAgentFactory(SshAgentFactory agentFactory) |
void |
setChannelFactories(List<NamedFactory<Channel>> channelFactories) |
void |
setCipherFactories(List<NamedFactory<Cipher>> cipherFactories) |
void |
setCompressionFactories(List<NamedFactory<Compression>> compressionFactories) |
void |
setFileSystemFactory(FileSystemFactory fileSystemFactory) |
void |
setGlobalRequestHandlers(List<RequestHandler<ConnectionService>> globalRequestHandlers) |
void |
setIoServiceFactoryFactory(IoServiceFactoryFactory ioServiceFactory) |
void |
setKeyExchangeFactories(List<NamedFactory<KeyExchange>> keyExchangeFactories) |
void |
setKeyPairProvider(KeyPairProvider keyPairProvider) |
void |
setMacFactories(List<NamedFactory<Mac>> macFactories) |
void |
setNioWorkers(int nioWorkers) |
void |
setProperties(Map<String,Object> properties) |
void |
setRandomFactory(Factory<Random> randomFactory) |
void |
setScheduledExecutorService(ScheduledExecutorService executor) |
void |
setScheduledExecutorService(ScheduledExecutorService executor,
boolean shutdownExecutor) |
void |
setServiceFactories(List<ServiceFactory> serviceFactories) |
void |
setSignatureFactories(List<NamedFactory<Signature>> signatureFactories) |
void |
setTcpipForwarderFactory(TcpipForwarderFactory tcpipForwarderFactory) |
void |
setTcpipForwardingFilter(ForwardingFilter tcpipForwardingFilter) |
protected void |
setupSessionTimeout(AbstractSessionFactory sessionFactory) |
protected void |
stopSessionTimeoutListener(AbstractSessionFactory sessionFactory) |
doCloseGracefully, doCloseImmediately, getInnerCloseablebuilder, close, isClosed, isClosing, preCloseclose, isOpenprotected IoServiceFactoryFactory ioServiceFactoryFactory
protected IoServiceFactory ioServiceFactory
protected List<NamedFactory<KeyExchange>> keyExchangeFactories
protected List<NamedFactory<Cipher>> cipherFactories
protected List<NamedFactory<Compression>> compressionFactories
protected List<NamedFactory<Mac>> macFactories
protected List<NamedFactory<Signature>> signatureFactories
protected KeyPairProvider keyPairProvider
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
public IoServiceFactory getIoServiceFactory()
getIoServiceFactory in interface FactoryManagerpublic IoServiceFactoryFactory getIoServiceFactoryFactory()
public void setIoServiceFactoryFactory(IoServiceFactoryFactory ioServiceFactory)
public List<NamedFactory<KeyExchange>> getKeyExchangeFactories()
FactoryManagerKeyExchange.getKeyExchangeFactories in interface FactoryManagerKeyExchange factories, never nullpublic void setKeyExchangeFactories(List<NamedFactory<KeyExchange>> keyExchangeFactories)
public List<NamedFactory<Cipher>> getCipherFactories()
FactoryManagerCipher.getCipherFactories in interface FactoryManagerCipher factories, never nullpublic void setCipherFactories(List<NamedFactory<Cipher>> cipherFactories)
public List<NamedFactory<Compression>> getCompressionFactories()
FactoryManagerCompression.getCompressionFactories in interface FactoryManagerCompression factories, never nullpublic void setCompressionFactories(List<NamedFactory<Compression>> compressionFactories)
public List<NamedFactory<Mac>> getMacFactories()
FactoryManagerMac.getMacFactories in interface FactoryManagerMac factories, never nullpublic void setMacFactories(List<NamedFactory<Mac>> macFactories)
public List<NamedFactory<Signature>> getSignatureFactories()
FactoryManagerSignature.getSignatureFactories in interface FactoryManagerSignature factories, never nullpublic void setSignatureFactories(List<NamedFactory<Signature>> signatureFactories)
public Factory<Random> getRandomFactory()
FactoryManagerRandom factory to be used.getRandomFactory in interface FactoryManagerRandom factory, never nullpublic KeyPairProvider getKeyPairProvider()
FactoryManagerKeyPairProvider that will be used to find
the host key to use on the server side or the user key on the client side.getKeyPairProvider in interface FactoryManagerKeyPairProvider, never nullpublic void setKeyPairProvider(KeyPairProvider keyPairProvider)
public Map<String,Object> getProperties()
FactoryManagerA 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 FactoryManagerMap containing configuration values, never nullpublic String getVersion()
FactoryManagerSSHD-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 FactoryManagerpublic 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 object 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)
protected void setupSessionTimeout(AbstractSessionFactory sessionFactory)
protected void removeSessionTimeout(AbstractSessionFactory sessionFactory)
protected SessionTimeoutListener createSessionTimeoutListener()
protected void stopSessionTimeoutListener(AbstractSessionFactory sessionFactory)
protected void checkConfig()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.