|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MessageSender
This Java interface is the parent interface for all the message senders that you can implement
in your client applications depending on your business requirements; it defines the necessary methods for sending
(asynchronous,
synchronous, or
client-side timeout) the HCI messages that include the operation requests for the connected SAP CC system.
If you want to implement some business services provided by the HTTP Communication Interface (HCI) technical interface of
SAP Convergent Charging, you must develop a message sender in your client application
to send HCI messages and receive the results:
Notse
You can implement asynchronous or synchronous communications between your client application and the connected SAP CC system.
In synchronous communications, you can define a client-side timeout. A CommunicationFailureException is
automatically thrown inside your client application if the connected SAP CC system does not reply to your request message
before the timeout expires.
Use the asyncSend(..) and send(..) methods to manage the communications between your client application and
the connected SAP CC system.
CommunicationFailureException,
BadMessageFormatException| Nested Class Summary | |
|---|---|
static interface |
MessageSender.IRedirectHandler
This Java interface enables to be aware of HTTP redirection events in your client application. |
| 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. |
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 env)
Sends a HCI message and receives its results via the HCI technical interface;
The communications are synchronous. |
MessageEnvelope |
send(MessageEnvelope env,
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. |
| Method Detail |
|---|
MessageEnvelope send(MessageEnvelope env)
throws CommunicationFailureException,
BadMessageFormatException
HCI message and receives its results via the HCI technical interface;
The communications are synchronous.
env - The message to send
CommunicationFailureException - if the SAP CC system cannot be reached
BadMessageFormatException - if the message received is in a bad format
MessageEnvelope send(MessageEnvelope env,
int timeout)
throws CommunicationFailureException,
BadMessageFormatException
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.
Option: You can define a client-side timeout.
env - 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 formatvoid addRedirectHandler(MessageSender.IRedirectHandler redirectHandler)
redirection handler to this MessageSender;
This handler is notified of redirection events.
redirectHandler - The redirection event handler to addMessageSender.IRedirectHandlervoid removeRedirectHandler(MessageSender.IRedirectHandler redirectHandler)
MessageSender.IRedirectHandler from this MessageSender;
The handler is not be notified anymore of redirection events.
redirectHandler - The redirection event handler to remove
MessageContext asyncSend(MessageEnvelope env,
ClientMessageListener listener)
throws CommunicationFailureException,
BadMessageFormatException
HCI message and receives notification of progress
and upon termination of the message process via a dedicated listener.
env - 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
CommunicationFailureException - if the SAP CC system
cannot be reached
BadMessageFormatException - if the message is in
a bad format
|
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 | ||||||||