org.norther.tammi.core.security
Class DefaultKeyStoreFactory

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.security.DefaultKeyStoreFactory
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Manageable, MBeanDelegate, ObjectFactory, KeyStoreFactory

public class DefaultKeyStoreFactory
extends DefaultObjectFactory
implements KeyStoreFactory

A default implementation of KeyStoreFactory.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
DefaultKeyStoreFactory()
          Constructs a key store factory.
 
Method Summary
 void addProvider(Provider provider)
          Adds a new security provider.
 String getDefaultProvider()
          Gets the default key store provider.
 String getDefaultType()
          Gets the default key store type.
 Object getInstance(String className, ObjectName loader, Object[] params, String[] signature)
          Gets an instance of a named class using a specified class loader.
 boolean isLoaderSupported(String className)
          Checks if specified class loaders are supported for a named class.
 void setDefaultProvider(String provider)
          Sets the default key store provider.
 void setDefaultType(String type)
          Sets the default key store type.
 
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, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, 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.base.ObjectFactory
getInstance, getInstance, getInstance
 

Constructor Detail

DefaultKeyStoreFactory

public DefaultKeyStoreFactory()
Constructs a key store factory.

Method Detail

getDefaultType

public String getDefaultType()
Description copied from interface: KeyStoreFactory
Gets the default key store type.

Specified by:
getDefaultType in interface KeyStoreFactory
Returns:
the type.

setDefaultType

public void setDefaultType(String type)
Description copied from interface: KeyStoreFactory
Sets the default key store type.

Specified by:
setDefaultType in interface KeyStoreFactory
Parameters:
type - the type.

getDefaultProvider

public String getDefaultProvider()
Description copied from interface: KeyStoreFactory
Gets the default key store provider.

Specified by:
getDefaultProvider in interface KeyStoreFactory
Returns:
the provider.

setDefaultProvider

public void setDefaultProvider(String provider)
Description copied from interface: KeyStoreFactory
Sets the default key store provider.

Specified by:
setDefaultProvider in interface KeyStoreFactory
Parameters:
provider - the provider.

addProvider

public void addProvider(Provider provider)
Description copied from interface: KeyStoreFactory
Adds a new security provider.

Specified by:
addProvider in interface KeyStoreFactory
Parameters:
provider - the provider.

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.

isLoaderSupported

public boolean isLoaderSupported(String className)
Description copied from interface: ObjectFactory
Checks if specified class loaders are supported for a named class.

Specified by:
isLoaderSupported in interface ObjectFactory
Overrides:
isLoaderSupported in class DefaultObjectFactory
Parameters:
className - the name of the class.
Returns:
true if class loaders are supported, false otherwise.


Copyright © 2004 The Norther Organization. All rights reserved.