Project: stp

javax.wvcm
Class ProviderFactory

Object
  extended by javax.wvcm.ProviderFactory

public final class ProviderFactory
extends Object

A factory class for creating instances of a WVCM provider. This is a convenience class used to simplify the creation of an instance of a WVCM provider. A provider is identified by its class name and is runtime loaded.

Since:
1.0

Nested Class Summary
static interface ProviderFactory.Callback
          Provides callback functions that can be invoked by a provider.
 
Method Summary
static Provider createProvider(String providerName, ProviderFactory.Callback callback)
          Create a WVCM provider with the given class name.
static Provider createProvider(String providerName, ProviderFactory.Callback callback, Map<String,String> initArgs)
          Get a WVCM provider with the given class name, with specified initializers.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createProvider

public static Provider createProvider(String providerName,
                                      ProviderFactory.Callback callback)
                               throws Exception
Create a WVCM provider with the given class name.

Parameters:
providerName - the fully-qualified class name of the provider.
callback - the object containing the getAuthentication method that the Provider will call whenever it needs to authenticate the current user.
Returns:
an instance of the Provider whose class name is providerName.
Throws:
Exception - if no class of the given name can be found, loaded, or initialized.

createProvider

public static Provider createProvider(String providerName,
                                      ProviderFactory.Callback callback,
                                      Map<String,String> initArgs)
                               throws Exception
Get a WVCM provider with the given class name, with specified initializers.

Parameters:
providerName - the class name of the provider.
callback - the object containing the getAuthentication method that the Provider will call whenever it needs to authenticate the current user.
initArgs - a Map containing provider-specific initialization values.
Returns:
an instance of the Provider whose class name is providerName.
Throws:
Exception - if no class of the given name can be found, loaded, or initialized.
Since:
1.1

Generated Wed 8-Apr-2015 01:06 AM

Copyright © IBM 2015. All rights reserved.