Package org.somda.sdc.dpws.http.apache
Class ApacheTransportBindingFactoryImpl
- java.lang.Object
-
- org.somda.sdc.dpws.http.apache.ApacheTransportBindingFactoryImpl
-
- All Implemented Interfaces:
TransportBindingFactory,HttpClientFactory
public class ApacheTransportBindingFactoryImpl extends Object implements TransportBindingFactory, HttpClientFactory
Factory for creating apache http client backed transport bindings and clients.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransportBindingcreateHttpBinding(String endpointUri)Creates an HTTP or HTTPS binding.HttpClientcreateHttpClient()Creates an http client.TransportBindingcreateTransportBinding(String endpointUri)Generic factory method to create a binding on the basis of a URI.org.apache.http.client.HttpClientgetClient()Access the configured apache http client.
-
-
-
Method Detail
-
createTransportBinding
public TransportBinding createTransportBinding(String endpointUri) throws UnsupportedOperationException
Description copied from interface:TransportBindingFactoryGeneric factory method to create a binding on the basis of a URI.Please note that - depending on the implementation - bindings are not supported. In this case an
UnsupportedOperationExceptionis thrown.- Specified by:
createTransportBindingin interfaceTransportBindingFactory- Parameters:
endpointUri- the URI to create a binding to.- Returns:
- a transport binding bound to endpointUri.
- Throws:
UnsupportedOperationException- if the URI scheme is not supported.
-
createHttpBinding
public TransportBinding createHttpBinding(String endpointUri) throws UnsupportedOperationException
Description copied from interface:TransportBindingFactoryCreates an HTTP or HTTPS binding.- Specified by:
createHttpBindingin interfaceTransportBindingFactory- Parameters:
endpointUri- a valid HTTP/HTTPS URI to create a binding to.- Returns:
- a transport binding bound to endpointUri.
- Throws:
UnsupportedOperationException- if the URI scheme type is not supported.
-
createHttpClient
public HttpClient createHttpClient()
Description copied from interface:HttpClientFactoryCreates an http client.- Specified by:
createHttpClientin interfaceHttpClientFactory- Returns:
- a transport binding bound to endpointUri.
-
getClient
public org.apache.http.client.HttpClient getClient()
Access the configured apache http client.Note: Do not use this client for productive purposes, always use the TransportBinding instead. This is only useful if you want to send intentionally bad messages to a server, which you most likely do not want.
- Returns:
- the configured apache http client
-
-