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
Modifier and TypeMethodDescriptioncreateHttpBinding(String endpointUri, CommunicationLog communicationLog) Creates an HTTP or HTTPS binding.Creates an http client.createTransportBinding(String endpointUri, CommunicationLog communicationLog) Generic factory method to create a binding on the basis of a URI.org.apache.http.client.HttpClientAccess the configured apache http client.
-
Method Details
-
createTransportBinding
public TransportBinding createTransportBinding(String endpointUri, @Nullable CommunicationLog communicationLog) 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.communicationLog- the communication log to be used for the endpoint. Set to null to use a default communication log.- Returns:
- a transport binding bound to endpointUri.
- Throws:
UnsupportedOperationException- if the URI scheme is not supported.
-
createHttpBinding
public TransportBinding createHttpBinding(String endpointUri, @Nullable CommunicationLog communicationLog) 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.communicationLog- the communication log to be used for the endpoint. Set to null to use a default communication log.- Returns:
- a transport binding bound to endpointUri.
- Throws:
UnsupportedOperationException- if the URI scheme type is not supported.
-
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
-