Class StatelessServiceClient

java.lang.Object
com.highdeal.cnd.message.AsyncRatingServiceClient
com.highdeal.cnd.message.StatelessServiceClient
All Implemented Interfaces:
com.highdeal.barbus.ISSLContextProvider

public class StatelessServiceClient extends AsyncRatingServiceClient
This Java class allows 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.

Consider the following information in this topic:

Synchronous Services and Operations

Deprecated Services and Operations

The following business operations or services are now deprecated and replaced. SAP SE recommends that you do not implement these operations anymore. They will be revoked in newer versions of SAP Convergent Charging.

Business Services Deprecated Operations Technical Names (Consider the methods in this Java class) Replaced by
Non authenticated server connection All class builders (except the empty one) that connect the client to the server without user credentials. Replaced by the StatelessServiceClient() + a call to AsyncRatingServiceClient.setUserCredentials(String, String) then a call to one of the following methods to connect the client:

Features

This rating and charging client benefits from the functions provided by the Message TCP technical interface. Refer to its features about:

  • High Availability Management
  • High Volume Management
  • High Performance Management

Communication Timeout

When a timeout is associated to a given message client, it must be performed during this limited time. If this limited time is exceeded, the operation is rolled back but client timeout does not guarantee that related operations successfully ended (see Technical Reference Guide).

High Performances

By default, this charging client provides high throughput performances and very low latency responses. For very high troughput performances, consider the fine-tuning activity.

High Availability (HA)

By default, this charging client provides high availability services with an SAP CC system with distributed instances in HA setup.

Security

To implement user authentication between the client and SAP CC, the client must set up some valid user credentials by calling the setUserCredentials() method.
Then, the client application will be authenticated and authorized to connect to the SAP CC server by calling one of the following connect() methods:

Code Snippet

The following code snippet provides an example of how to authenticate a client application to the SAP CC server :

    private static final String DISPATCHER_HOST = "localhost";
    private static final int DISPATCHER_EXT_PORT = 2000;

    // Initialize the stateless service client by (always) calling the empty builder (other builders are deprecated)
    StatelessServiceClient client = new StatelessServiceClient();

    // Set the user credentials for the new created client
    // These credentials must refer to an existing service user in SAP CC having the "messageChargingClient" role.
    client.setUserCredentials("clientX", "foopasswd");

    //Call one of the connect() methods that are provided in the Service Client classes according to the
    //  expected behavior.
    ConnectionStatus status = client.connect(DISPATCHER_HOST, DISPATCHER_EXT_PORT);

    // Check the result of the  connect() method.
    if (!status.isServiceAvailable()) { // No dispatcher can be reached
    } // else at least one CC dispatcher has been reached and charging is available
 

Implementation in Your Client Application

Initializing and Connecting

Your charging client (based on this StatefulServiceClient class) must be initialized via establishing a connection to one of more dispatcher instances available in the distant SAP CC system. Once at least one dispatcher of the SAP CC system is connected from the client application, the client application retrieves automatically the list of all available dispatcher instances on the server system side. It establishes a connection with every one of them automatically.

Implementing Event-Based Rating Services

Depending on your business requirements, you implement one of the following operations in your Java-based client application:

Additional Information

Consult all the online and offline charging services that you can implement in your Java-based client application and in your system landscape.

Consult the SAP CC Application Help for more information about the online charging services, the charging process and its execution modes (stateless, stateful).