org.jboss.wise.core.client.factories
Class WSDynamicClientFactory

java.lang.Object
  extended by org.jboss.wise.core.client.factories.WSDynamicClientFactory
Direct Known Subclasses:
ReflectionWSDynamicClientFactory

@ThreadSafe
public abstract class WSDynamicClientFactory
extends java.lang.Object

WSDynamicClientFactory is a singleton containing a WSDynamicClient cache. It's able to create WSDynamicCient objects, and init then using WiseProperties using wise-core.properties find in classpath as default. This default properties may be overridden using setWiseProperties method.

Author:
Stefano Maestri, stefano.maestri@javalinux.it

Constructor Summary
WSDynamicClientFactory()
           
 
Method Summary
abstract  WSDynamicClientBuilder createBuilder()
           
 WiseClientConfiguration getConfig()
           
static WSDynamicClientFactory getInstance()
           
 RSDynamicClient getJAXRSClient(java.lang.String endpointURL, RSDynamicClient.HttpMethod httpMethod, java.lang.String produceMediaTypes, java.lang.String consumeMediaTypes)
          Return an instance of RSDynamicClient taken from cache if possible, generate and initialise if not.
 RSDynamicClient getJAXRSClient(java.lang.String endpointURL, RSDynamicClient.HttpMethod httpMethod, java.lang.String produceMediaTypes, java.lang.String consumeMediaTypes, java.lang.String userName, java.lang.String password)
          Return an instance of RSDynamicClient taken from cache if possible, generate and initialise if not.
 WSDynamicClient getJAXWSClient(java.lang.String wsdlURL)
           
 WSDynamicClient getJAXWSClient(java.lang.String wsdlURL, java.util.List<java.io.File> bindings, java.io.File catelog)
           
 WSDynamicClient getJAXWSClient(java.lang.String wsdlURL, java.lang.String userName, java.lang.String password)
          Return an instance of WSDynamicClient taken from cache if possible, generate and initialise if not.
 WSDynamicClient getJAXWSClient(java.lang.String wsdlURL, java.lang.String userName, java.lang.String password, java.lang.String targetPackage, java.util.List<java.io.File> bindings, java.io.File catelog)
           
static void initialise()
          Provide a method to clean up cached thing when Wise is integrated with JBoss or other container
 void setConfig(WiseClientConfiguration config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDynamicClientFactory

public WSDynamicClientFactory()
Method Detail

initialise

public static void initialise()
Provide a method to clean up cached thing when Wise is integrated with JBoss or other container


getInstance

public static WSDynamicClientFactory getInstance()
                                          throws MCKernelUnavailableException
Throws:
MCKernelUnavailableException

getJAXWSClient

public WSDynamicClient getJAXWSClient(java.lang.String wsdlURL)
                               throws java.lang.IllegalStateException,
                                      java.net.ConnectException,
                                      WiseRuntimeException
Throws:
java.lang.IllegalStateException
java.net.ConnectException
WiseRuntimeException

getJAXWSClient

public WSDynamicClient getJAXWSClient(java.lang.String wsdlURL,
                                      java.lang.String userName,
                                      java.lang.String password)
                               throws java.lang.IllegalStateException,
                                      java.net.ConnectException,
                                      WiseRuntimeException
Return an instance of WSDynamicClient taken from cache if possible, generate and initialise if not.

Parameters:
wsdlURL - The URL to retrive wsdl of webservice called
userName - we support HTTP BASIC Auth protected wsdls: this is username used for authentication
password - we support HTTP BASIC Auth protected wsdls: this is password used for authentication
Returns:
an instance of WSDynamicClient already initialized, ready to call endpoints
Throws:
java.lang.IllegalStateException
java.net.ConnectException - thrown in case wsdl isn't accessible at given URL
WiseRuntimeException

getJAXWSClient

public WSDynamicClient getJAXWSClient(java.lang.String wsdlURL,
                                      java.util.List<java.io.File> bindings,
                                      java.io.File catelog)
                               throws java.lang.IllegalStateException,
                                      java.net.ConnectException,
                                      WiseRuntimeException
Throws:
java.lang.IllegalStateException
java.net.ConnectException
WiseRuntimeException

getJAXWSClient

public WSDynamicClient getJAXWSClient(java.lang.String wsdlURL,
                                      java.lang.String userName,
                                      java.lang.String password,
                                      java.lang.String targetPackage,
                                      java.util.List<java.io.File> bindings,
                                      java.io.File catelog)
                               throws java.lang.IllegalStateException,
                                      java.net.ConnectException,
                                      WiseRuntimeException
Throws:
java.lang.IllegalStateException
java.net.ConnectException
WiseRuntimeException

getJAXRSClient

public RSDynamicClient getJAXRSClient(java.lang.String endpointURL,
                                      RSDynamicClient.HttpMethod httpMethod,
                                      java.lang.String produceMediaTypes,
                                      java.lang.String consumeMediaTypes,
                                      java.lang.String userName,
                                      java.lang.String password)
Return an instance of RSDynamicClient taken from cache if possible, generate and initialise if not.

Parameters:
endpointURL -
produceMediaTypes -
consumeMediaTypes -
httpMethod -
userName -
password -
Returns:
an instance of RSDynamicClient already initialized, ready to be called

getJAXRSClient

public RSDynamicClient getJAXRSClient(java.lang.String endpointURL,
                                      RSDynamicClient.HttpMethod httpMethod,
                                      java.lang.String produceMediaTypes,
                                      java.lang.String consumeMediaTypes)
Return an instance of RSDynamicClient taken from cache if possible, generate and initialise if not.

Parameters:
endpointURL -
produceMediaTypes -
consumeMediaTypes -
httpMethod -
Returns:
an instance of RSDynamicClient already initialized, ready to be called

getConfig

public final WiseClientConfiguration getConfig()

setConfig

public final void setConfig(WiseClientConfiguration config)

createBuilder

public abstract WSDynamicClientBuilder createBuilder()