Package com.highdeal.cnd.message
Java package provides the main Java classes and interfaces to implement the Message TCP high-speed technical interface of SAP CC;
With this package, you can develop a client
application able to send chargeable items to the SAP CC system to charge (online or offline) or quote for the usage of a customer service
by end customers.
| Technical Interface | Message TCP |
| Communication Protocol | TCP/IP |
| Communication Mode | Asynchronous, Synchronous |
| Public Endpoints | Dispatcher instances of the SAP CC system (Each dispatcher instance has a communication port relating to the TCP communications) |
| API Technology |
|
| SAP CC Java Library | core-client.jar
|
| Security | Yes (see the SAP CC Security Guide) |
| Load Balancing | Yes |
| Failover | Yes |
Consider the following information in this topic:
- Message TCP technical interface
- Global charging services
- Implementation in your client application
- Notes on SAP CC implementation
Technical Interface: Message TCP
SAP Convergent Charging delivers an ultra-speed technical interface that you can implement in your SAP system landscape and develop in your Java-based client application to trigger business and technical operations to the SAP CC system connected via this technical interface.
Communication Infrastructure
The Message TCP technical interface defines a communication infrastructure to exchange messages between your client application and the connected SAP CC system.
Business Services
The Message TCP technical interface provides the following business services for prepaid and postpaid environments.
| Business Service | Online Charging and Notification | Offline Charging |
|---|---|---|
| Description | Online charging | Offline charging |
| Services | Real-Time Charging:
|
Non Real-Time Charging:
|
| Environment | Prepaid and postpaid | Postpaid |
| Real-Time | Yes | No |
Recommendation
Refer to the SAP CC Application Help for more information about the global charging services.
APIs for the Message TCP Interface
To implement some business services available in the Message TCP technical interface of SAP CC, you can use the following Java packages:
Features
The Message TCP technical interface provides important features that you can implement in your system landscape.Note
Consult the SAP CC Application Help for more information about high availability, high data volume and performances. It details the functions and mechanisms available in SAP Convergent Charging.
High Availability (HA) Management
- Heartbeat function
- Multiple failover functions
High Volume Management
Multiple load balancing functionsHigh Performance Management
- Multiple load balancing functions
- Asynchronous services
Notification Handling
You can implement the handling of the business notifications sent by the SAP CC Core Server system:- Asynchronous service for batch management: The notifications are regularly sent by the SAP CC system. You can develop a Java-based client application that is
responsible for handling and processing these notifications. Refer to the com.highdeal.notification
Java package. - Synchronous service for real-time management: Certain notifications are embedded by the SAP CC system in the result messages of the charging operation requests. The renew reservation notifications are only available in session-based charging services and require a specialized listener. You can implement in your client application the immediate processing of all these business notifications.
Security
The Message TCP technical interface provides secured communications via the TCP/IP channel. Consult the SAP CC Security Guide. The Message TCP technical interface can request client application to be authenticated. Consult the SAP CC Security Guide. Consult the security section in the javadoc of differentcharging clients classes.
Communications
- TCP/IP
- Asynchronous, Synchronous
- Public Endpoints: Dispatcher instances of the SAP CC system
Global Charging Services
Online Charging
The Online Charging Services enable to process in real time the incoming chargeable items sent by your mediation system in a connected mode (also called 'online' mode). These chargeable items relate to the usage (consumption) of a customer service. The mediation system sends the chargeable items before or during the service usage.
| Business Services | Async. Comm. | Sync. Comm. |
|---|---|---|
Stateful Session-Based Charging Service
| Yes | Yes |
Stateful Event-Based Charging Service
| Yes | Yes |
| Stateless Rating Service | No | Yes |
Business Notification Service
|
Yes | Yes |
Business Processes Synchronization Service
|
Yes | Yes |
Business Monitoring Service
|
Yes | Yes |
Offline Charging
The Offline Charging Services enable to process a set of chargeable items sent by your mediation system in a disconnected mode (also called 'offline' mode). These chargeable items relate to the past usage (consumption) of a customer service. When relevant, your mediation system connects to and sends the chargeable items after the service usage.
| Business Services | Async. Comm. | Sync. Comm. |
|---|---|---|
| Offline Acquisition Service (for Deferred Charging Service) | Yes | Yes |
Offline Charging Service (batch mode or single)
| Yes | Yes |
| Recharging Service (for Rerating Service) | Yes | Yes |
Implementation in Your Client Application
This Java package provides you with the classes necessary to implement
online charging or offline charging services and relating
service operations.
This section provides you with a developer guide:
- Operation management
- Charging client classes
- Initialization
- Connection
- Communications (time-out, termination)
- Exception and error handling
- Notification management
Operation Management
All the charging operations are available as Java methods that you call in a customized charging client class
of your implementation code.
If you implement the asynchronous communications (see the AsyncStatefulServiceClient and AsyncBatchServiceClient classes) to speed up the processing,
consider the <a href="ChargeExceptionListener.html>specialized listeners that are dedicated to the handling of the operation results in your client
application. This processing includes the exception and error handling.
Charging Client Classes
Several charging client classes are available according to your business requirements:
| Charging Service | Charging Client Class | Business Services |
|---|---|---|
| Online Charging (with or without credit control) |
|
|
| Offline Charging |
|
Recommendation
For very high performances you should implement the AsyncStatefulServiceClient (online charging) and the AsyncBatchServiceClient (offline charging).
Monitoring Client Classes
Several monitoring client classes are available according to your business requirements:
| Charging Service | Charging Client Class | Business Services |
|---|---|---|
| Online Charging (with or without credit control) |
|
Recommendation
For very high performances you should implement the AsyncStatefulServiceClient (online charging).
Initialization
Your Java-based client application initializes a charging client when it starts and stops when the client application stops.
Connection
Your charging client must be initialized by establishing a connection to one of more dispatcher instances available in the distant SAP CC
Core Server system.
This can be the primary dispatcher or another dispatcher instance.
Once at least one dispatcher instance of the SAP CC system is connected from your client application, then this charging client retrieves
automatically the list of all the dispatcher instances available on the SAP CC system side.
Note
The charging client establishes automatically in the background a connection with each dispatcher instance to ensure load balancing and failover functions.
Available Methods
All the connect(.) methods provide this mecanism:
- void connect(java.lang.String systemName, java.net.InetSocketAddress... bootDispatcherAddresses)
- void connect(java.lang.String systemName, com.highdeal.barbus.InstanceAddress... bootDispatcherAddresses)
- void connect(java.lang.String hostname, int hostport)
- void connect(java.lang.String hostname, int port, boolean secure, java.lang.String bindAddress, int timeout, FoundLostRatingListener ratingListener, ServiceClientTuning config)
- void connect(java.lang.String hostname, int hostport, FoundLostRatingListener ratingListener)
- void connect(java.lang.String systemName, int lookupDuration, java.net.InetSocketAddress discoveryAddress, java.lang.String bindAddress, int timeout, FoundLostRatingListener ratingListener, ServiceClientTuning config, java.net.InetSocketAddress... bootDispatcherAddresses)
- void connect(java.lang.String systemName, int lookupDuration, java.net.InetSocketAddress discoveryAddress, java.lang.String bindAddress, int timeout, FoundLostRatingListener ratingListener, ServiceClientTuning config, com.highdeal.barbus.InstanceAddress... bootDispatcherAddresses)
- void connect(java.lang.String hostname, int hostport, int timeout)
- void connect(java.lang.String hostname, int hostport, java.lang.String bindAddress, int timeout, FoundLostRatingListener ratingListener)
- void connect(java.lang.String hostname, int port, java.lang.String bindAddress, int timeout, FoundLostRatingListener ratingListener, ServiceClientTuning config)
Communications
Once an initial connection is established to the distant SAP CC system, your client application will be automatically connected.
Client Timeout
Defining a timeout is optional. Depending on the nature of the charging workflow, the recommended timeout may vary greatly.
Recommendation
For event-based charging, no timeout is recommended.
Termination
Your client application must release the connections when it ends.
Exception and Error Handling
Depending on your business requirements, you design and develop the relevant exception and error handling functions in your client application.
| Client-Side Failures | Server System Failures |
|---|---|
CommunicationFailureException
|
|
Note
If you implement the asynchronous communications (see the AsyncStatefulServiceClient and AsyncBatchServiceClient classes) to speed up the processing, consider the specialized listeners that are dedicated to the handling of the operation results in your client application. This processing includes the exception and error handling.
Notification Management
Prerequisites
You must set up the charging operation requests to include the rated transactions in the resulting purchase orders.
The rated transactions include the notifications generated during the charging process.
Refer to the ts flag available in the different methods of the charging clients.
Performances
Very high throughput:
- Pool of charging clients
- Asynchronous communications
- Tuning
Notes on SAP CC Implementation
Pooling
Your client application can manage a pool of charging clients for parallel processing, high volume traffic.
Specialized Listeners (Asynchronous Communication)
If you implement the asynchronous communications to speed up the processing, consider the specialized listeners that are dedicated to the handling of the operation results in your client application.
The relevant listener depends on the type of the business operations you want to manage.
Note
This processing includes the exception and error handling when an operation request failed.
Service Operations
Event-Based Charging Operations
Event-Based Charge (Online or Offline Service)
Batch Charge (Offline Service)
Best-Effort Charge (Online Service)
Get Estimated Price (Online Service)
Blank Charge (Online Service)
This operation estimates the price by asking the SAP CC system to rate and charge in blank mode the specified chargeable item that simulates a customer service usage. The chargeable item can correspond to a real service consumption (not charged) or to the simulation of service consumption. You implement this operation if you want to provide advice of charge services in your SAP system landscape.
Note
This operation is equivalent to the event-based charge operation but the blank mode means that no data is committed to the database.
Caution
If the transaction processor does not take care about the database transaction (transaction processor that stores the transactions into a file by example), the transaction processor action will not be rolled back.
Inverse Rate (Check Limit)
What is the maximum quantity of service I can consume based on an amount?
Session-Based Charging Operations
SAP Convergent Charging can provide charging services for service usage information that is based on consumption sessions. Session-based charging operations are only available in real-time enviroment to implement online charging service in your system landscape.
Session-Based Charge (Online Service)
Additional Information
Consult the SAP CC Application Help for more information about the convergent charging services, the implementation scenario variants, and the charging and activation processes.
-
ClassDescriptionThis
Java interfacedefines theonResult(..) methodcalled by theasynchronous batch service clientwhen performing asynchronous chargeable item acquisition by using themethodAsyncBatchServiceClient.acquire(List, AcquisitionListener).This interface has to be implemented by the classes in charge for processing the result of the activate operation.This mainJava classprovides the necessary operations to implement Offline Charging Services (OFCS) in your SAP system landscape by using the Message TCP technical interface with asynchronous communications for the highest throughput performances.Thisabstract Java classprovides common methods to open, close a connection, and send rating messages.This mainJava classprovides the operations necessary to implement real-time charging services (event-based or session-based) in your SAP system landscape by using the Message TCP technical interface with asynchronous communications for the highest throughput performances.This class represents aclient operation event listenerable to supervise the activity of the instances of the SAP CC Core Server system by limiting the number of operations in the server instances.ThisJava interfacehas to be implemented by the classes in charge for processing the result of a batch charge operation; the result may include an exception.This mainJava classprovides the necessary operations to implement Offline Charging Services (OFCS) in your SAP system landscape to send chargeable items to the connected SAP CC Core Server system to charge the past usage (consumption) of a marketable service by end customers; This class enables synchronous communications via the Message TCP high-speed technical interface.Rerating service client request handler: always refuse rerating information, except if a rerating information handler has been set.Exception thrown when something wrong happens during the cancel rating session operation.Deprecated.ThisJava interfacedefines the necessarymethodsthat you design and develop to handle the result (succes, failure) of a charging operation requested by thecharging clientin your client application.ThisJava interfacespecifies severalonException(..) methodsfor handling exceptions in thecharging clientof your client application; Consider theknown subinterfaces.This interface must be implemented by the classes in charge of processing theresultof an asynchronous charging operation.This interface has to be implemented by the classes in charge for processing the result of a check limit operation.This interface has to be implemented by the classes in charge for processing the result of a cleanup operation.ThisJava classis used to collect the information elements generated by the ClientOPEventListener and the client API.The client operation event listener interface to receive client operation events.Thisenumerationlists the operations where it is possible to have an event listener in your client application.Exception internally thrown when the communication between your client application and the SAP CC Core Server system fails via the Message TCP technical interface: This exception is only generated on client-side in yourcustomized charging client.The class contains the connection status information after a connect method is called (e.g.ThisJava classrepresents an empty event listener for receiving client operation events.ThisJava interfacehas to be implemented by the classes which must handle exceptions; It specifies theonException(..) methodinvoked to hanlde possible errors related toForbiddenCharge exceptions.ThisJava interfaceis dedicated for managing a listener that is notified when a rater instance of the SAP CC system is found or lost.This interface defines methods called while a connection is authenticated.Thisenumerationlists the possible reasons for themessage authentication exception.ThisJava interfacedefines the method for setting up or changing the external data that are included in the renew reservation notifications.ThisJava interfacehas to be implemented by the caller of theAsyncStatefulServiceClient.monitorSpendingStatus(String, byte, String, String[], int, IMonitorSpendingStatusResultListener)method for processing results and exceptions.ThisJava interfaceprovides data of the result of spending status monitoring.Thisenumerationlists the possible actions: no action, created, changed, or canceled.ThisJava interfacedefines amethod onException(..)dedicated to the handling of theinvalid item exceptionin your client application; First consider theknown subinterfacesthat specify the listeners to implement in your code.ThisJava interfaceenables to inform the connected SAP CC system that the renew reservation notification is handled during session-based charging operations (see the online charging services).ThisJava interfaceenables areservation renewal listenerto be informed when the business acknowledgement has been received by the connected SAP CC system.ThisJava interfaceenables acharging clientto be notified of reservation renewal during multiservice session-based charging operations (see the online charging services).ThisJava interfacedefines the necessary method for setting up the identifier of the reservation renewal listener (RRL) that is responsible for handling renew reservation notifications during session-based charging operations.ThisJava interfacedefines the method relevant for executing an operation of a session-based charging scenario.ThisJava interfacedefines theprepareConfirmAndReserve(..) methodthat is relevant for managing an update event of a session-based charging scenario.ThisJava interfacedefines thekey methodsnecessary for managing areservation confirmationorreservation cancellationduring session-based charging; implement theprepareConfirm(..) methodand theprepareCancel(..) methodto finalize a reservation in a charging session.ThisJava interfacedefines generic methods and attributes for session-based charging operations; Consider the subinterfaces.Thisenumerationdefines the selection criteria fortransactionselection: NONE_TRANSACTION, MASTER_TRANSACTION, ALL_TRANSACTION, or ALL_TRANSACTION_AND_RECURRING.ThisJava interfacedefines themethodrelevant for executing and requesting an operation in a session-based charging scenario; the execution in your charging client sends the service operation to the connected SAP CC system.ThisJava interfacedefines the keyprepareReserve(..) methodnecessary for managing a reservation during session-based charging.Thisenumerationlists the resolutions of a session reservation: confirmed of canceled.This interface defines methods relevant for managing a reservation during session-based charging scenario.ThisJava interfacehas to be implemented by the caller in charge of processing the results and exceptions a of a session-based charging scenario.ThisJava interfacedefines necessarymethodsfor implementing the beginning of a multiservice session during session-based charging operations: youpreparethe expected reservations for an end customer and youtrigger the start operationby executing the object returned by thecreateSessionStartAsyncOperation(..) methodin yourcharging client.ThisJava interfacedefines necessarymethodsfor implementing the beginning of a multiservice session during session-based charging operations: youpreparethe expected reservations for an end customer and youtrigger the start operationby executing the object returned by thecreateSessionStartOperation(..) methodin yourcharging client.ThisJava interfacedefines the necessarymethodsfor implementing ancreateSessionUpdaAsyncOperation(..) updateof a multiservice session during session-based charging operations; for each charging session, youconfirm a reservation,cancel, orextend a reservation.ThisJava interfacedefines the necessarymethodsfor implementing an update of a multiservice session during session-based charging operations; for each charging session, youconfirm a reservation,cancel, orextend a reservation.ThisJava interfacedefines the necessary methods to inform the SAP CC Core Server system that the spending status report is handled in your client application.ThisJava interfacedefines a method to be informed thatyour acknowledgementhas been received by connected SAP CC system.ThisJava interfaceenables amonitoring clientto be notified of spending status reports during customer service usage.Exception thrown when an error occurs during the authentication of a user login on the message API.Deprecated.Deprecated since version 2.0 of SAP CC and replaced by the operations of the session-based charging servicesException thrown when an error occurs during the execution of a subscription rerating operation in the connected SAP CC system; this exception includes a nested exception that explains the cause.This class is a set of tuning properties for the service client.FOR INTERNAL USE ONLY - ThisJava classrepresents a multiservice session operation request that is sent to the connected SAP CC system to manage session-based charging services.FOR INTERNAL USE ONLY - Thisenumerationlists the types of operations: START, UPDATE, and STOP.This interface has to be implemented by the classes in charge for processing the result of session operations.This class defines the result of a session-based charging operation.ThisJava classrepresents the spending status with its latest label value.This mainJava classprovides the operations necessary to implement real-time charging services (event-based or session-based) in your system landscape by using the Message TCP technical interface with very high throughput performances.ThisJava classallows your client application to send some stateless rating and prerating events to the connected SAP CC Core Server system by using the Message TCP high-speed technical interface.This interface has to be implemented by the classes in charge for processing the result of a translate operation.
StatefulServiceClientJava class.