org.apache.sshd.common
Class AbstractFactoryManager

java.lang.Object
  extended by org.apache.sshd.common.AbstractFactoryManager
All Implemented Interfaces:
FactoryManager
Direct Known Subclasses:
SshClient, SshServer

public abstract class AbstractFactoryManager
extends java.lang.Object
implements FactoryManager

TODO Add javadoc

Author:
Apache MINA SSHD Project

Field Summary
protected  SshAgentFactory agentFactory
           
protected  java.util.List<NamedFactory<Channel>> channelFactories
           
protected  java.util.List<NamedFactory<Cipher>> cipherFactories
           
protected  java.util.List<NamedFactory<Compression>> compressionFactories
           
protected  java.util.concurrent.ScheduledExecutorService executor
           
protected  java.util.List<NamedFactory<KeyExchange>> keyExchangeFactories
           
protected  KeyPairProvider keyPairProvider
           
protected  java.util.List<NamedFactory<Mac>> macFactories
           
protected  java.util.Map<java.lang.String,java.lang.String> properties
           
protected  Factory<Random> randomFactory
           
protected  boolean shutdownExecutor
           
protected  java.util.List<NamedFactory<Signature>> signatureFactories
           
protected  ForwardingAcceptorFactory tcpipForwardingAcceptorFactory
           
protected  java.lang.String version
           
 
Fields inherited from interface org.apache.sshd.common.FactoryManager
DEFAULT_NIO_WORKERS, MAX_PACKET_SIZE, NIO_WORKERS, WINDOW_SIZE
 
Constructor Summary
protected AbstractFactoryManager()
           
 
Method Summary
 SshAgentFactory getAgentFactory()
          Retrieve the agent factory for creating SshAgent objects.
 java.util.List<NamedFactory<Channel>> getChannelFactories()
          Retrieve the list of named factories for Channel objects.
 java.util.List<NamedFactory<Cipher>> getCipherFactories()
          Retrieve the list of named factories for Cipher.
 java.util.List<NamedFactory<Compression>> getCompressionFactories()
          Retrieve the list of named factories for Compression.
 java.util.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.
 java.util.List<NamedFactory<Mac>> getMacFactories()
          Retrieve the list of named factories for Mac.
 int getNioWorkers()
           
 java.util.Map<java.lang.String,java.lang.String> 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.
 java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
          Retrieve the ScheduledExecutorService to be used.
 java.util.List<NamedFactory<Signature>> getSignatureFactories()
          Retrieve the list of named factories for Signature.
 ForwardingAcceptorFactory getTcpipForwardingAcceptorFactory()
          Retrieve the IoAcceptor factory to be used to accept incoming connections to port forwards.
 java.lang.String getVersion()
          An upper case string identifying the version of the software used on client or server side.
protected  void loadVersion()
           
 void setAgentFactory(SshAgentFactory agentFactory)
           
 void setChannelFactories(java.util.List<NamedFactory<Channel>> channelFactories)
           
 void setCipherFactories(java.util.List<NamedFactory<Cipher>> cipherFactories)
           
 void setCompressionFactories(java.util.List<NamedFactory<Compression>> compressionFactories)
           
 void setKeyExchangeFactories(java.util.List<NamedFactory<KeyExchange>> keyExchangeFactories)
           
 void setKeyPairProvider(KeyPairProvider keyPairProvider)
           
 void setMacFactories(java.util.List<NamedFactory<Mac>> macFactories)
           
 void setNioWorkers(int nioWorkers)
           
 void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
           
 void setRandomFactory(Factory<Random> randomFactory)
           
 void setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor)
           
 void setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor, boolean shutdownExecutor)
           
 void setSignatureFactories(java.util.List<NamedFactory<Signature>> signatureFactories)
           
 void setTcpipForwardNioSocketAcceptorFactory(ForwardingAcceptorFactory f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected java.util.Map<java.lang.String,java.lang.String> properties

keyExchangeFactories

protected java.util.List<NamedFactory<KeyExchange>> keyExchangeFactories

cipherFactories

protected java.util.List<NamedFactory<Cipher>> cipherFactories

compressionFactories

protected java.util.List<NamedFactory<Compression>> compressionFactories

macFactories

protected java.util.List<NamedFactory<Mac>> macFactories

signatureFactories

protected java.util.List<NamedFactory<Signature>> signatureFactories

randomFactory

protected Factory<Random> randomFactory

keyPairProvider

protected KeyPairProvider keyPairProvider

version

protected java.lang.String version

channelFactories

protected java.util.List<NamedFactory<Channel>> channelFactories

agentFactory

protected SshAgentFactory agentFactory

executor

protected java.util.concurrent.ScheduledExecutorService executor

shutdownExecutor

protected boolean shutdownExecutor

tcpipForwardingAcceptorFactory

protected ForwardingAcceptorFactory tcpipForwardingAcceptorFactory
Constructor Detail

AbstractFactoryManager

protected AbstractFactoryManager()
Method Detail

getKeyExchangeFactories

public java.util.List<NamedFactory<KeyExchange>> getKeyExchangeFactories()
Description copied from interface: FactoryManager
Retrieve the list of named factories for KeyExchange.

Specified by:
getKeyExchangeFactories in interface FactoryManager
Returns:
a list of named KeyExchange factories, never null

setKeyExchangeFactories

public void setKeyExchangeFactories(java.util.List<NamedFactory<KeyExchange>> keyExchangeFactories)

getCipherFactories

public java.util.List<NamedFactory<Cipher>> getCipherFactories()
Description copied from interface: FactoryManager
Retrieve the list of named factories for Cipher.

Specified by:
getCipherFactories in interface FactoryManager
Returns:
a list of named Cipher factories, never null

setCipherFactories

public void setCipherFactories(java.util.List<NamedFactory<Cipher>> cipherFactories)

getCompressionFactories

public java.util.List<NamedFactory<Compression>> getCompressionFactories()
Description copied from interface: FactoryManager
Retrieve the list of named factories for Compression.

Specified by:
getCompressionFactories in interface FactoryManager
Returns:
a list of named Compression factories, never null

setCompressionFactories

public void setCompressionFactories(java.util.List<NamedFactory<Compression>> compressionFactories)

getMacFactories

public java.util.List<NamedFactory<Mac>> getMacFactories()
Description copied from interface: FactoryManager
Retrieve the list of named factories for Mac.

Specified by:
getMacFactories in interface FactoryManager
Returns:
a list of named Mac factories, never null

setMacFactories

public void setMacFactories(java.util.List<NamedFactory<Mac>> macFactories)

getSignatureFactories

public java.util.List<NamedFactory<Signature>> getSignatureFactories()
Description copied from interface: FactoryManager
Retrieve the list of named factories for Signature.

Specified by:
getSignatureFactories in interface FactoryManager
Returns:
a list of named Signature factories, never null

setSignatureFactories

public void setSignatureFactories(java.util.List<NamedFactory<Signature>> signatureFactories)

getRandomFactory

public Factory<Random> getRandomFactory()
Description copied from interface: FactoryManager
Retrieve the Random factory to be used.

Specified by:
getRandomFactory in interface FactoryManager
Returns:
the Random factory, never null

setRandomFactory

public void setRandomFactory(Factory<Random> randomFactory)

getKeyPairProvider

public KeyPairProvider getKeyPairProvider()
Description copied from interface: FactoryManager
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.

Specified by:
getKeyPairProvider in interface FactoryManager
Returns:
the KeyPairProvider, never null

setKeyPairProvider

public void setKeyPairProvider(KeyPairProvider keyPairProvider)

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()
Description copied from interface: FactoryManager
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.

Specified by:
getProperties in interface FactoryManager
Returns:
a valid Map containing configuration values, never null

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)

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 of the software and usually looks like: SSHD-1.0

Specified by:
getVersion in interface FactoryManager
Returns:
the version of the software

loadVersion

protected void loadVersion()

getChannelFactories

public java.util.List<NamedFactory<Channel>> getChannelFactories()
Description copied from interface: FactoryManager
Retrieve the list of named factories for Channel objects.

Specified by:
getChannelFactories in interface FactoryManager
Returns:
a list of named Channel factories, never null

setChannelFactories

public void setChannelFactories(java.util.List<NamedFactory<Channel>> 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 creating SshAgent objects.

Specified by:
getAgentFactory in interface FactoryManager
Returns:
the factory

setAgentFactory

public void setAgentFactory(SshAgentFactory agentFactory)

getScheduledExecutorService

public java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
Description copied from interface: FactoryManager
Retrieve the ScheduledExecutorService to be used.

Specified by:
getScheduledExecutorService in interface FactoryManager
Returns:
the ScheduledExecutorService, never null

setScheduledExecutorService

public void setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor)

setScheduledExecutorService

public void setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor,
                                        boolean shutdownExecutor)

getTcpipForwardingAcceptorFactory

public ForwardingAcceptorFactory getTcpipForwardingAcceptorFactory()
Description copied from interface: FactoryManager
Retrieve the IoAcceptor factory to be used to accept incoming connections to port forwards.

Specified by:
getTcpipForwardingAcceptorFactory in interface FactoryManager
Returns:
A ForwardNioAcceptorFactory

setTcpipForwardNioSocketAcceptorFactory

public void setTcpipForwardNioSocketAcceptorFactory(ForwardingAcceptorFactory f)


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.