|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.hci.http.HttpMessageSender
public class HttpMessageSender
Your client application must use an HttpMessageSender to send HCI messages and receive correspondind results
using the HTTP protocol via HCI; Asynchronous or
synchronous communications are possible.
You use the HttpMessageSenderFactory to instantiate such a Java class.
This HttpMessageSender defines Java classes and method to send
Use the HttpMessageSenderFactory class to instantiate an HttpMessageSender object.
Important Note
This Java class should not be instantiated directly, but
obtained through the HttpMessageSenderFactory class.
Use benefit from the asyncSend(..) and send(..) methods to manage the communications between your client application and
the connected SAP CC system.
HttpMessageSenderFactory| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.highdeal.hci.MessageSender |
|---|
MessageSender.IRedirectHandler |
| Constructor Summary | |
|---|---|
HttpMessageSender(java.lang.String serverUrl,
XMLMapping mapping)
Should not be used directly; see HttpMessageSenderFactory. |
|
HttpMessageSender(java.lang.String serverUrl,
XMLMapping mapping,
javax.net.ssl.SSLSocketFactory sslSocketFactory)
Should not be used directly; see HttpMessageSenderFactory. |
|
HttpMessageSender(java.net.URL serverUrl,
XMLMapping mapping)
Should not be used directly; see HttpMessageSenderFactory. |
|
HttpMessageSender(java.net.URL serverUrl,
XMLMapping mapping,
javax.net.ssl.SSLSocketFactory sslSocketFactory)
Should not be used directly; see HttpMessageSenderFactory. |
|
| Method Summary | |
|---|---|
void |
addRedirectHandler(MessageSender.IRedirectHandler redirectHandler)
Adds a redirection handler to this MessageSender;
This handler is notified of redirection events. |
MessageContext |
asyncSend(MessageEnvelope env,
ClientMessageListener listener)
Sends a HCI message and receives notification of progress
and upon termination of the message process via a dedicated listener. |
MessageContext |
asyncSend(MessageEnvelope env,
ClientMessageListener listener,
java.util.HashMap<java.lang.String,java.lang.String> addHeaders)
|
java.net.URL |
getServerUrl()
|
void |
removeRedirectHandler(MessageSender.IRedirectHandler redirectHandler)
Removes a MessageSender.IRedirectHandler from this MessageSender;
The handler is not be notified anymore of redirection events. |
MessageEnvelope |
send(MessageEnvelope message)
Sends a HCI message and receives its results via the HCI technical interface;
The communications are synchronous. |
MessageEnvelope |
send(MessageEnvelope message,
java.util.HashMap<java.lang.String,java.lang.String> addHeaders)
|
MessageEnvelope |
send(MessageEnvelope message,
int timeout)
Sends a HCI message and receives its results via the HCI technical interface;
this method is protected by a timeout, that means that, if the SAP CC system
does not answer within the timeout, a communication failure
is sent. |
MessageEnvelope |
send(MessageEnvelope message,
int timeout,
java.util.HashMap<java.lang.String,java.lang.String> addHeaders)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpMessageSender(java.lang.String serverUrl,
XMLMapping mapping)
throws java.net.MalformedURLException
HttpMessageSenderFactory.
java.net.MalformedURLException
public HttpMessageSender(java.lang.String serverUrl,
XMLMapping mapping,
javax.net.ssl.SSLSocketFactory sslSocketFactory)
throws java.net.MalformedURLException
HttpMessageSenderFactory.
java.net.MalformedURLException
public HttpMessageSender(java.net.URL serverUrl,
XMLMapping mapping)
HttpMessageSenderFactory.
public HttpMessageSender(java.net.URL serverUrl,
XMLMapping mapping,
javax.net.ssl.SSLSocketFactory sslSocketFactory)
HttpMessageSenderFactory.
| Method Detail |
|---|
public java.net.URL getServerUrl()
public void addRedirectHandler(MessageSender.IRedirectHandler redirectHandler)
MessageSenderredirection handler to this MessageSender;
This handler is notified of redirection events.
addRedirectHandler in interface MessageSenderredirectHandler - The redirection event handler to addMessageSender.IRedirectHandlerpublic void removeRedirectHandler(MessageSender.IRedirectHandler redirectHandler)
MessageSenderMessageSender.IRedirectHandler from this MessageSender;
The handler is not be notified anymore of redirection events.
removeRedirectHandler in interface MessageSenderredirectHandler - The redirection event handler to remove
public MessageEnvelope send(MessageEnvelope message)
throws CommunicationFailureException,
BadMessageFormatException
MessageSenderHCI message and receives its results via the HCI technical interface;
The communications are synchronous.
send in interface MessageSendermessage - The message to send
CommunicationFailureException - if the SAP CC system cannot be reached
BadMessageFormatException - if the message received is in a bad format
public MessageEnvelope send(MessageEnvelope message,
java.util.HashMap<java.lang.String,java.lang.String> addHeaders)
throws CommunicationFailureException,
BadMessageFormatException
CommunicationFailureException
BadMessageFormatException
public MessageEnvelope send(MessageEnvelope message,
int timeout)
throws CommunicationFailureException,
BadMessageFormatException
MessageSenderHCI message and receives its results via the HCI technical interface;
this method is protected by a timeout, that means that, if the SAP CC system
does not answer within the timeout, a communication failure
is sent.
Option: You can define a client-side timeout.
send in interface MessageSendermessage - The HCI message to sendtimeout - The timeout in millisecond (ms), a negative number means no timeout
CommunicationFailureException - if the SAP CC system cannot be reached or
if the timeout expires
BadMessageFormatException - if the message received is in a bad format
public MessageEnvelope send(MessageEnvelope message,
int timeout,
java.util.HashMap<java.lang.String,java.lang.String> addHeaders)
throws CommunicationFailureException,
BadMessageFormatException
CommunicationFailureException
BadMessageFormatException
public MessageContext asyncSend(MessageEnvelope env,
ClientMessageListener listener)
throws BadMessageFormatException,
CommunicationFailureException
MessageSenderHCI message and receives notification of progress
and upon termination of the message process via a dedicated listener.
asyncSend in interface MessageSenderenv - The HCI message to sendlistener - A listener that will be notified of
progress and upon termination of
operations and message
message context that can be used to cancel
the message or retrieve results
BadMessageFormatException - if the message is in
a bad format
CommunicationFailureException - if the SAP CC system
cannot be reached
public MessageContext asyncSend(MessageEnvelope env,
ClientMessageListener listener,
java.util.HashMap<java.lang.String,java.lang.String> addHeaders)
throws BadMessageFormatException,
CommunicationFailureException
BadMessageFormatException
CommunicationFailureException
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||