public interface IReservationRenewalListener
Java interface enables a charging client to be notified of reservation renewal during
multiservice session-based charging operations (see the online charging services).
IReservationRenewalAcknowledger).
Refer to the Advanced Implementation section in the StatefulServiceClient class
or in the AsyncStatefulServiceClient class to see how to implement this IReservationRenewalListener interface.
Example
A charging client manages the session-based charging operations and is able to handle
the renew reservation notifications sent by the SAP CC system. This charging client implements a reservation renewal listener.
Example: Separate clients
A charging client is dedicated to the credit control and does not handle the renew reservation notifications.
A notification client implements a reservation renewal listener and is dedicated to handle the renew reservation notifications sent by the SAP CC system.
The listener is stateless and only forward the renew reservation notifications to different downstream network elements.
It selects the appropriate network element by using the externalData information
specified by a charging client.
It belongs to the same client application of the charging client or it belongs to another client application.
registerReservationRenewalListener(..) method in the StatefulServiceClient class or
the AsyncStatefulServiceClient.registerReservationRenewalListener(byte, IReservationRenewalListener) method.
Your client application must implement this IReservationRenewalListener interface to be able to handle renew reservation notifications
during session-based chargin operations.
The implementation of this interface allows the SAP CC system to inform the client application that additional credit has been made available during a multiservice charging session.
When such a notification occurs, the client application may not have to stop the session and may continue to update the session by making new reservations on charging sessions.
The client application can handle this use case by implementing an IReservationRenewalListener and attaching it to the charging client.
The IReservationRenewalListener interface defines a unique method to handle the notification: onRenewReservation().
This method provides the necessary parameters to handle the notification:
IReservationRenewalAcknowledger object that must be used to acknowledge the receipt of this notification
IReservationRenewalAcknowledger) when the notification resend subfunction is expected by your business requirements
Consult the SAP CC Configuration and Implementation Guide to know the necessary configuration settings of the SAP CC system that relates to the reservation renewal function available in the session-based charging services.
The acknowledger is an optional feature allowing the client application to tell the SAP CC system the renew reservation notification has been received and handled.
This feature is useful when the RENEW_RESERVATION_RESEND_ATTEMPTS parameter of the SAP CC system is set with a positive and non zero value.
Once the SAP CC system is acknowledged by the client application, the resend function is cancelled for this notification.
Code Snippet
The following code snippet provides an example of how to implement an IReservationRenewalListener interface in order to receive and handle a Renew Reservation notification:
private class MyReservationRenewalListener implements IReservationRenewalListener {
public void onRenewReservation(String sessionId, String reservationId, byte[] externalData, short resendAttempt, IReservationRenewalAcknowledger acknowledger) {
// Simple implementation: print notification to console
System.out.println("Renew Reservation notification received for session/reservation " + sessionId + " " + reservationId);
// (Optional) Acknowledge the handling message
acknowledger.ack(new IReservationRenewalAcknowledgerListener() {
public void onException(ServerFailureException e) {
// Handle server failure exception
System.err.println("ServerFailureException in acknowledgment: " + e.getMessage());
}
public void onException(IllegalArgumentException e) {
// Handle illegal argument exception
System.err.println("IllegalArgumentException in acknowledgment: " + e.getMessage());
}
public void onException(CommunicationFailureException e) {
// Handle communication failure exception
System.err.println("CommunicationFailureException in acknowledgment: " + e.getMessage());
}
public void onResult() {
// Handle acknowledgment result
System.out.println("Server has received acknowledgment");
}
});
}
}
| Modifier and Type | Method and Description |
|---|---|
void |
onRenewReservation(java.lang.String sessionId,
java.lang.String reservationId,
byte[] externalData,
short resendAttempt,
IReservationRenewalAcknowledger reservationRenewalAcknowledger)
Invoked each time a renew reservation notification must be handled by your customized listener in the client application.
|
void onRenewReservation(java.lang.String sessionId,
java.lang.String reservationId,
byte[] externalData,
short resendAttempt,
IReservationRenewalAcknowledger reservationRenewalAcknowledger)
sessionId - The identifier of the multiservice session where the partial reservation occurredreservationId - The identifier of the reservation which was partially granted. It is also used
to identify the charging session flagged as Partially Granted Reservation.externalData - The information data sent by the charging client with the ISessionStartChargingOperation and/or
the ISessionUpdateChargingOperation via the IExternalDataSettable interface.resendAttempt - The number of the resend(s) of the notificationreservationRenewalAcknowledger - An implementation of IReservationRenewalAcknowledger must be provided if the
SAP CC system is configured to resend renew reservation notifications.
A business acknowledgement
is expected to end further resend of the notification.