org.norther.tammi.core.nio
Class DefaultSecureServerChannelFactory

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.base.DefaultObjectFactory
          extended by org.norther.tammi.core.net.AbstractCommonFactory
              extended by org.norther.tammi.core.net.AbstractCommonSecureFactory
                  extended by org.norther.tammi.core.nio.DefaultSecureServerChannelFactory
All Implemented Interfaces:
Serializable, EventListener, NotificationBroadcaster, NotificationEmitter, NotificationListener, Manageable, MBeanDelegate, ObjectFactory, CommonFactory, CommonSecureFactory, SecureServerChannelFactory, ServerChannelFactory

public class DefaultSecureServerChannelFactory
extends AbstractCommonSecureFactory
implements SecureServerChannelFactory

A default implementation of SecureServerChannelFactory.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.core.net.AbstractCommonFactory
socketBacklog
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.core.nio.SecureServerChannelFactory
DEFAULT_SSL_PROTOCOL
 
Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
DefaultSecureServerChannelFactory()
          Constructs an SSL base socket factory.
 
Method Summary
 String[] getEnabledCipherSuites(String alias)
          Gets the enabled cipher suites for the specified key store alias.
 Object getInstance(String className, ObjectName loader, Object[] params, String[] signature)
          Gets an instance of a named class using a specified class loader.
protected  ServerSocketFactory getServerSocketFactory(String alias, String pswd)
          Gets the implementation of the server socket factory.
protected  SocketFactory getSocketFactory(String alias, String pswd)
          Gets the implementation of the socket factory.
 String[] getSupportedCipherSuites(String alias)
          Gets the supported cipher suites for the specified key store alias.
 boolean isSecure()
          Checks whether sockets produced are secure.
 
Methods inherited from class org.norther.tammi.core.net.AbstractCommonSecureFactory
clearContextObjects, getDefaultAlias, getKeyManagerAlgorithm, getKeyManagerProvider, getKeyStoreLoaderName, getSecureSocketProtocol, getSecureSocketProvider, getSSLContext, getTrustManagerAlgorithm, getTrustManagerProvider, getTrustStoreLoaderName, handleNotification, postmanaged, setDefaultAlias, setDefaultPassword, setKeyManagerAlgorithm, setKeyManagerProvider, setKeyStoreLoaderName, setSecureSocketProtocol, setSecureSocketProvider, setTrustManagerAlgorithm, setTrustManagerProvider, setTrustStoreLoaderName, unmanaged
 
Methods inherited from class org.norther.tammi.core.net.AbstractCommonFactory
createServerSocket, createSocket, getBacklog, getSoTimeout, isLoaderSupported, isReuseAddress, setBacklog, setReuseAddress, setSoTimeout
 
Methods inherited from class org.norther.tammi.core.base.DefaultObjectFactory
getInstance, getInstance, getInstance
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.core.net.CommonSecureFactory
getDefaultAlias, getKeyManagerAlgorithm, getKeyManagerProvider, getKeyStoreLoaderName, getSecureSocketProtocol, getSecureSocketProvider, getTrustManagerAlgorithm, getTrustManagerProvider, getTrustStoreLoaderName, setDefaultAlias, setDefaultPassword, setKeyManagerAlgorithm, setKeyManagerProvider, setKeyStoreLoaderName, setSecureSocketProtocol, setSecureSocketProvider, setTrustManagerAlgorithm, setTrustManagerProvider, setTrustStoreLoaderName
 
Methods inherited from interface org.norther.tammi.core.net.CommonFactory
getSoTimeout, isReuseAddress, setReuseAddress, setSoTimeout
 
Methods inherited from interface org.norther.tammi.core.base.ObjectFactory
getInstance, getInstance, getInstance, isLoaderSupported
 
Methods inherited from interface org.norther.tammi.core.net.CommonFactory
getSoTimeout, isReuseAddress, setReuseAddress, setSoTimeout
 
Methods inherited from interface org.norther.tammi.core.base.ObjectFactory
getInstance, getInstance, getInstance, isLoaderSupported
 

Constructor Detail

DefaultSecureServerChannelFactory

public DefaultSecureServerChannelFactory()
Constructs an SSL base socket factory.

Method Detail

isSecure

public boolean isSecure()
Description copied from interface: CommonFactory
Checks whether sockets produced are secure.

Specified by:
isSecure in interface CommonFactory
Overrides:
isSecure in class AbstractCommonSecureFactory
Returns:
true for secure sockets.

getEnabledCipherSuites

public String[] getEnabledCipherSuites(String alias)
Description copied from interface: CommonSecureFactory
Gets the enabled cipher suites for the specified key store alias.

Specified by:
getEnabledCipherSuites in interface CommonSecureFactory
Parameters:
alias - the alias.
Returns:
an array of cipher suite names.

getSupportedCipherSuites

public String[] getSupportedCipherSuites(String alias)
Description copied from interface: CommonSecureFactory
Gets the supported cipher suites for the specified key store alias.

Specified by:
getSupportedCipherSuites in interface CommonSecureFactory
Parameters:
alias - the alias.
Returns:
an array of cipher suite names.

getInstance

public Object getInstance(String className,
                          ObjectName loader,
                          Object[] params,
                          String[] signature)
                   throws ConstructionException
Description copied from interface: ObjectFactory
Gets an instance of a named class using a specified class loader. Parameters for its constructor are given as an array of objects, primitive types must be wrapped with a corresponding class.

Class loaders are supported only if the isLoaderSupported method returns true. Otherwise the loader parameter is ignored.

Specified by:
getInstance in interface ObjectFactory
Overrides:
getInstance in class DefaultObjectFactory
Parameters:
className - the name of the class.
loader - the class loader.
params - an array containing the parameters of the constructor.
signature - an array containing the signature of the constructor.
Returns:
the instance.
Throws:
ConstructionException - if construction fails.

getSocketFactory

protected SocketFactory getSocketFactory(String alias,
                                         String pswd)
                                  throws ConstructionException
Description copied from class: AbstractCommonFactory
Gets the implementation of the socket factory.

Specified by:
getSocketFactory in class AbstractCommonFactory
Parameters:
alias - an optional key alias.
pswd - an optional key password.
Returns:
the factory.
Throws:
ConstructionException - if a resource is not available.

getServerSocketFactory

protected ServerSocketFactory getServerSocketFactory(String alias,
                                                     String pswd)
                                              throws ConstructionException
Description copied from class: AbstractCommonFactory
Gets the implementation of the server socket factory.

Specified by:
getServerSocketFactory in class AbstractCommonFactory
Parameters:
alias - an optional key alias.
pswd - an optional key password.
Returns:
the factory.
Throws:
ConstructionException - if a resource is not available.


Copyright © 2004 The Norther Organization. All rights reserved.