Package org.somda.sdc.dpws.http.apache
Class ClientTransportBinding
- java.lang.Object
-
- org.somda.sdc.dpws.http.apache.ClientTransportBinding
-
- All Implemented Interfaces:
Closeable,AutoCloseable,NotificationCallback,RequestResponseCallback,TransportBinding
public class ClientTransportBinding extends Object implements TransportBinding
Binding providing request-response and notification capabilities using an HttpClient.
-
-
Field Summary
Fields Modifier and Type Field Description static StringUSER_AGENT_KEYstatic StringUSER_AGENT_VALUE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidonNotification(SoapMessage notification)Callback that is triggered after an interceptor chain succeeded on the outgoing direction.SoapMessageonRequestResponse(SoapMessage request)Callback that is triggered after an interceptor chain succeeded on the outgoing direction.
-
-
-
Field Detail
-
USER_AGENT_KEY
public static final String USER_AGENT_KEY
- See Also:
- Constant Field Values
-
USER_AGENT_VALUE
public static final String USER_AGENT_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
onNotification
public void onNotification(SoapMessage notification) throws TransportBindingException
Description copied from interface:NotificationCallbackCallback that is triggered after an interceptor chain succeeded on the outgoing direction.As notifications are handled as fire and forget, no faults and answers are accepted.
todo DGr may accept SOAP faults for better error analysis.
- Specified by:
onNotificationin interfaceNotificationCallback- Parameters:
notification- the notification to push.- Throws:
TransportBindingException
-
onRequestResponse
public SoapMessage onRequestResponse(SoapMessage request) throws TransportBindingException, SoapFaultException
Description copied from interface:RequestResponseCallbackCallback that is triggered after an interceptor chain succeeded on the outgoing direction.- Specified by:
onRequestResponsein interfaceRequestResponseCallback- Parameters:
request- the request to convey to the message receiver.- Returns:
- a SOAP message with the received response from the network.
- Throws:
SoapFaultException- in case the server answers with a SOAP fault.TransportBindingException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-