BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.webservice.client
Class SSLAdapterFactory

java.lang.Object
  |
  +--weblogic.webservice.client.SSLAdapterFactory

public class SSLAdapterFactory
extends java.lang.Object

SSLAdapterFactory.java Created: Wed Apr 10 09:33:34 2002

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Field Summary
static java.lang.String SSL_ADAPTER_PROPERTY
           
 
Constructor Summary
SSLAdapterFactory()
           
 
Method Summary
 SSLAdapter createSSLAdapter()
          Returns a new instance of the SSLAdapter class, regardless of whether useDefaultAdapter has been set true.
 SSLAdapter getDefaultAdapter()
          This returns the default instance of the this factory's SSLAdapter.
static SSLAdapterFactory getDefaultFactory()
          Returns the default factory.
 SSLAdapter getSSLAdapter()
          This method returns an instance of SSLAdapter if an adapter class is available.
 void setDefaultAdapter(SSLAdapter adapter)
          Sets the factory's default instance to one provided by the user.
static void setDefaultFactory(SSLAdapterFactory factory)
          Sets the default factory for SSLAdapters.
 void setUseDefaultAdapter(boolean useDefault)
          This method is used to toggle whether this instance of the SSLAdapterFactory will always return the default adapter instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSL_ADAPTER_PROPERTY

public static final java.lang.String SSL_ADAPTER_PROPERTY
Constructor Detail

SSLAdapterFactory

public SSLAdapterFactory()
Method Detail

setDefaultFactory

public static final void setDefaultFactory(SSLAdapterFactory factory)
Sets the default factory for SSLAdapters. The factory is used to create SSLAdapter instances in the webservice run time.

Parameters:
factory - a factory class instance

getDefaultFactory

public static final SSLAdapterFactory getDefaultFactory()
Returns the default factory.

Returns:
an the default factory instance.

getDefaultAdapter

public final SSLAdapter getDefaultAdapter()
This returns the default instance of the this factory's SSLAdapter. This instance is used by the run time if and only if the UseDefault flag has been set via the setUseDefaultAdapter() method.

Returns:
the default SSLAdapter instance
See Also:
setDefaultAdapter(SSLAdapter adapter), setUseDefaultAdapter(boolean useDefault)

setDefaultAdapter

public final void setDefaultAdapter(SSLAdapter adapter)
Sets the factory's default instance to one provided by the user. Setting this to null will cause a new instance to be generated on the next request.

Use this if you want to configure an SSLAdapter once and share it across all web service ports.

Parameters:
adapter - an SSLAdapter instance
See Also:
getDefaultAdapter(), setUseDefaultAdapter(boolean useDefault)

setUseDefaultAdapter

public final void setUseDefaultAdapter(boolean useDefault)
This method is used to toggle whether this instance of the SSLAdapterFactory will always return the default adapter instance. Set this to true to enable use of a shared default SSLAdapter instance.

Parameters:
useDefault - whether or not to return the default SSLAdapter instance for the factory from getSSLAdapter()
See Also:
getDefaultAdapter(), getSSLAdapter(), setUseDefaultAdapter(boolean useDefault)

getSSLAdapter

public final SSLAdapter getSSLAdapter()
This method returns an instance of SSLAdapter if an adapter class is available. It throws an SSLConfigurationException if none are available.

If the factory has been set to use a shared default adapter, it will return the default instance; else it will create a new one.

The type of adapter returned depends on whether the user has specified an adapter class and on what is available in the classpath. By default, the factory will check the weblogic.webservice.client.ssl.adapterclass system property for the name of a user provided adapter class. If the property has not been set, it will try the default Weblogic adapters. If no adapter class can be found, it will throw an SSLConfigurationException . The factory will only search for an adapter class on the first invocation. After an initial failure, all subsequent requests will simply return null.

Returns:
an instance of SSLAdapter
See Also:
getDefaultAdapter(), setDefaultAdapter(SSLAdapter adapter), setUseDefaultAdapter(boolean useDefault)

createSSLAdapter

public SSLAdapter createSSLAdapter()
Returns a new instance of the SSLAdapter class, regardless of whether useDefaultAdapter has been set true. This method must always return an SSLAdapter or throw an exception.

See Also:
getSSLAdapter(), setUseDefaultAdapter(boolean useDefault)

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81