Class AsyncBatchServiceClient
- All Implemented Interfaces:
com.highdeal.barbus.ISSLContextProvider
- Direct Known Subclasses:
BatchServiceClient
Java class provides 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.
Your client application converts the information data about the customer service usage (service consumption) as chargeable items and sends them to the connected SAP CC Core Server system to charge the past usage (consumption) of a marketable service by end customers; This class enables asynchronous communications via the Message TCP technical interface.
Consider the following information in this topic:
- Asynchronous Services and Operations
- Features
- Implementation in Your Client Application
- Notes on SAP CC Implementation
Asynchronous Services and Operations
- Offline acquisition step of the Deferred charging service - see
acquire(java.util.List, com.highdeal.cnd.message.AcquisitionListener) - Offline charging service (batch mode or single chargeable item)
- Quote service (blank charging)
- Recharging step of the Rerating end-to-end service (based on subscriptions or on provider contracts)
With this Java class, you can implement offline event-based charging services
via the Message TCP high-speed technical interface.
| Business Services: Offline Stateful Charging Services | Operations | Technical Names (Consider the methods in this Java class) | Result Listeners |
|---|---|---|---|
| Chargeable Item Acquisition | Batch acquisition operation | acquire(..)
| AcquisitionListener
|
| Offline Charging | Batch charging operation | batchCharge(..) to a contract or subscription
| BatchChargeEventListener
|
| Special: Event-based Advice of Charge | Blank charging operation | blankCharge(..)
| ChargeEventListener
|
Note
You can implement the rerating end-to-end service (based on provider contracts) by using another communication interface based on SOAP APIs: Refer to the specifications of the Web Services technical interface.
Note
- Consult all the offline charging services that you can implement in your Java-based client application used as a mediation system.
-
Refer to the
BatchServiceClient classfor synchronous communications and high throughput performances.
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.
Features
This charging client benefits
from the functions provided by the Messagte TCP technical interface.
Refer to its features about:
- High Availability Management
- High Volume Management
- High Performance Management
Event Listener
Most of the operation requests are asynchronous and expect a specialized event listener for processing their results
or exceptions in your charging client. These
custom listeners are invoked in your charging client when the business operation is successful with the result of
the operation or when it fails with an exception defining the problem.
Security
To implement a ciphered connection between the client and SAP CC, use AsyncRatingServiceClient.setSslContext(javax.net.ssl.SSLContext).
Then, the client application will be authenticated and authorized to connect to the SAP CC server by calling the
AsyncRatingServiceClient.connect(String hostname, int port, boolean secure, String bindAddress, int timeout, FoundLostRatingListener ratingListener, ServiceClientTuning config)
method, with secure parameter set to true.
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:
AsyncRatingServiceClient.connect(com.highdeal.admin.hci.InstanceMap, String, int, FoundLostRatingListener, ServiceClientTuning)AsyncRatingServiceClient.connect(String, java.net.InetSocketAddress...)AsyncRatingServiceClient.connect(String, com.highdeal.barbus.InstanceAddress...)AsyncRatingServiceClient.connect(String, int)AsyncRatingServiceClient.connect(String, int, boolean, String, int, FoundLostRatingListener, ServiceClientTuning)AsyncRatingServiceClient.connect(String, int, FoundLostRatingListener)AsyncRatingServiceClient.connect(String, int, java.net.InetSocketAddress, String, int, FoundLostRatingListener, ServiceClientTuning, java.net.InetSocketAddress...)AsyncRatingServiceClient.connect(String, int, java.net.InetSocketAddress, String, int, FoundLostRatingListener, ServiceClientTuning, com.highdeal.barbus.InstanceAddress...)AsyncRatingServiceClient.connect(String, int, int)AsyncRatingServiceClient.connect(String, int, String, int, FoundLostRatingListener)AsyncRatingServiceClient.connect(String, int, String, int, FoundLostRatingListener, ServiceClientTuning)
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 stateful service client by (always) calling the empty builder (other builders are deprecated)
AsyncBatchServiceClient client = new AsyncBatchServiceClient();
// Set the user credentials for the new created client
// These credentials must refer to an existing service user in SAP CC that has the "messageChargingClient" role.
client.setUserCredentials("clientX", "foopasswd");
//Call one of the connect() methods that are provided in 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
Implementing the Relevant Event Listener
You determine the event listener to develop by viewing the signature of the Java method that you
want to implement or by consulting the Asynchronous Services and Operations section.
See also the ChargeExceptionListener Java interface.
Initializing and Connecting
Code Snippet
The following code snippet provides an example of how to initialize a charging client based on the AsyncBatchServiceClient class:
AsyncBatchServiceClient client = new AsyncBatchServiceClient();
try {
client.connect("dispatcher.hostname", 9000);
} catch (IOException e) {
System.out.println("Dispatcher instance is not found. Reason is: "+e.getMessage());
return;
}
Terminating
Do not forget to close this client when it is no more used to release its resources and nested threads invoking its method {TEST com.highdeal.cnd.message.AsyncBatchServiceClient#close() close()}.
Most of its methods are asynchronous and expect a listener for processing their results or exceptions. These listeners are invoked when the operation is successful with the result of the operation or when it fails with an exception defining the problem.
Implementing Batch Acquisition Services
You can implement this business operation if both SAP Convergent Charging and SAP Convergent Invoicing are in your system landscape. The consumption item management function must be enable in SAP Convergent Invoicing in the SAP ERP/FI-CA system.
Use the method acquire(..) .
Implementing Batch Charging Services
Customizing Sequence
- guiderLookup
- batchCharge
Implementing Recharging for Rerating Services
To provide your system landscape with rerating services, you must implement the Recharging step of this process. This step follows the correction of the source(s) of the mistakes.
Recommendation
Before implementing these operations, refer to the SAP CC Application Help for more information about these processes.
Customizing Sequence
Use the following sequence of SAP CC operations to correct subsriptions or charging contracts:
- Identify the subscriptions or charging contracts to rerate
- Generate a
reratingLockCode - Call the
informStartSubscriptionReratingoperation for each subscription or charging contract to lock it and restore the values of its counters - Send the chargeable items to recharge for all subscriptions or charging contracts in chronological order
(by calling the
batchCharge(..) operationor thechargeoperation - Call the
informStopSubscriptionReratingoperation for each subscription or charging contract to unlock it
Additional Information
Consult all the online and offline charging services that you can implement in your Java-based client application.
Consult the SAP CC Application Help for more information about the Offline Charging Services.
Related Information
-
Field Summary
Fields inherited from class com.highdeal.cnd.message.AsyncRatingServiceClient
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRING, CANCELLED, CHARGING_RESULT_MSG, CHARGING_RESULT_REST, CHARGING_RESULT_WS, CONFIRMED, MASTER_TRANSACTION, NONE_TRANSACTION -
Constructor Summary
ConstructorsConstructorDescriptionCreates a non-initializedcharging clientfor implementing the offline charging services in your Java-based client application; Use one of the methodsconnect(..)must then be used to connect it to the distant SAP CC system.AsyncBatchServiceClient(String hostName, int port) Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection.AsyncBatchServiceClient(String hostName, int port, int timeout) Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection.AsyncBatchServiceClient(String hostName, int port, FoundLostRatingListener ratingListener) Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection.AsyncBatchServiceClient(String hostName, int port, String bindAddress, int timeout, FoundLostRatingListener ratingListener) Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection. -
Method Summary
Modifier and TypeMethodDescriptionvoidacquire(List<AcquisitionParameters> parameters, AcquisitionListener listener) Asks the server to asynchronously execute a list ofacquisition operations.voidbatchCharge(Vector<ChargeParameters> parameters, Long subscriptionID, short partitionID, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode, BatchChargeEventListener listener) Deprecated.voidbatchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, long suacID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode, BatchChargeEventListener listener) Requests the connected SAP CC Core Server system to charge in batch mode a sorted set of chargeable items for the specified user service ID (USID) and service ID (SID) and relating to an already identified subscription or charging contract.voidbatchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode, BatchChargeEventListener listener) Deprecated.voidblankCharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts, boolean ft, ChargeEventListener listener) Asks the server to rate (in blank mode) the specified chargeable item for the specified user service ID and the specified service ID at the specified date.voidcharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts, boolean ft, String reratingLockCode, ChargeEventListener listener) Asks the server to charge the specified chargeable item for the specified user service ID and service ID at the specified date.voidcharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, ChargeEventListener listener) Asks the server to rate the specified chargeable item for the specified user service ID and service ID at the specified date.voidcharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, String reratingLockCode, ChargeExecutionContext context, ChargeEventListener listener) Asks the server to charge the specified chargeable item for the specified user service ID and service ID at the specified date.voidguiderLookup(GuidingRequest[] requests, GuidingServiceClientListener listener) See theBatchServiceClient.guiderLookup(com.highdeal.guiding.common.GuidingRequest[])method for more information and consider also thenecessary listener.voidguiderLookup(GuidingRequest request, GuidingServiceClientListener listener) See theBatchServiceClient.guiderLookup(com.highdeal.guiding.common.GuidingRequest)method for more information and consider also thenecessary listener.voidguiderLookup(String serviceID, String userServiceID, Date consumptionDate, GuidingServiceClientListener listener) See theBatchServiceClient.guiderLookup(java.lang.String, java.lang.String, java.util.Date)method for more information and consider also thenecessary listener.voidinformStartContractCollectionRerating(String reratingLockCode, short partitionId, long suacId, Date restorationDate, List<Long> contractIdList, BatchChargeEventListener listener) Starts the rerating of a collection of charging contracts.voidinformStartContractCollectionRerating(String reratingLockCode, short partitionId, Date restorationDate, List<Long> contractIdList, BatchChargeEventListener listener) Deprecated.voidinformStartSubscriptionRerating(String reratingLockCode, long subscriptionId, Date restorationDate, short partitionId, long suacId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) Starts the rerating of a subscription or charging contract.voidinformStartSubscriptionRerating(String reratingLockCode, long subscriptionId, Date restorationDate, short partitionId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) Deprecated.voidinformStopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, long suacId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) Stops the rerating of a subscription or charging contract.voidinformStopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) Deprecated.voidinformUnlockSubscription(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, BatchChargeEventListener listener) Deprecated.booleanpingReratingOperation(String reratingLockCode) Checks if a rerating operation identified is running.voidsetReratingInfoRequestHandler(com.highdeal.barbus.RequestHandler newHandler) Sets an handler that will react to rerating information published by rerating service server.Methods inherited from class com.highdeal.cnd.message.AsyncRatingServiceClient
addAuthenticationListener, close, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getBootMode, getClientOpEventListener, getConnectionStatus, getSslContext, getTimeout, isAtLeastOneConnectionIsRegistered, isConnected, isNoTimeout, setBootMode, setClientOpEventListener, setHAEventListener, setNoTimeout, setSslContext, setUserCredentials, setUserCredentials
-
Constructor Details
-
AsyncBatchServiceClient
public AsyncBatchServiceClient()Creates a non-initializedcharging clientfor implementing the offline charging services in your Java-based client application; Use one of the methodsconnect(..)must then be used to connect it to the distant SAP CC system. -
AsyncBatchServiceClient
Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection. Creates a message client and connects it to the distant SAP CC system.- Parameters:
hostName- The host name of the serverport- The communication port on which the server waits for request- Throws:
IOException- if the client cannot connect to the server (if server is not running, for instance).
-
AsyncBatchServiceClient
@Deprecated public AsyncBatchServiceClient(String hostName, int port, int timeout) throws IOException Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection. Creates a message client and connects it to the distant SAP CC system.- Parameters:
hostName- The host name of the serverport- The port on which the server waits for requesttimeout- The timeout in milliseconds for each request (or -1 to wait indefinitely) If you use zero and acknowledgments are requested then aCommunicationFailureExceptionwill be thrown without sending request- Throws:
IOException- if the client cannot connect to the server (if server is not running, for instance).
-
AsyncBatchServiceClient
@Deprecated public AsyncBatchServiceClient(String hostName, int port, FoundLostRatingListener ratingListener) throws IOException Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection. Initializes a message client and connects it to the distant SAP CC system.- Parameters:
hostName- The host name of the serverport- The port on which the server waits for requestratingListener- The listener informed when rating is found or lost- Throws:
IOException- if the client cannot connect to the servers
-
AsyncBatchServiceClient
@Deprecated public AsyncBatchServiceClient(String hostName, int port, String bindAddress, int timeout, FoundLostRatingListener ratingListener) throws IOException Deprecated.Deprecated since version 4.1 SP2 of SAP CC and replaced by the empty builder and an authenticated connection. Initializes a message client and connects it to the distant SAP CC system- Parameters:
hostName- The host name of the serverport- The port on which the server waits for requestbindAddress-timeout- the timeout in milliseconds for each request (or -1 to wait indefinitely). If you use zero and acknowledgments are requested then aCommunicationFailureExceptionwill be thrown without sending request.ratingListener- the listener informed when rating is found or lost- Throws:
IOException- if the client cannot connect to the servers
-
-
Method Details
-
setReratingInfoRequestHandler
public void setReratingInfoRequestHandler(com.highdeal.barbus.RequestHandler newHandler) Sets an handler that will react to rerating information published by rerating service server.- Parameters:
newHandler- an implementation of an handler
-
charge
public void charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts, boolean ft, String reratingLockCode, ChargeEventListener listener) Asks the server to charge the specified chargeable item for the specified user service ID and service ID at the specified date.This operation may conflict with the prerating feature. Do not use this operation if some preratings are not post-rated.
- Parameters:
ci- theChargeableItemto chargeserviceID- the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID- the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate- the date the service was consumed by the end customerts- the transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- sets if the returned transactions must be filtered according to thetransactionTemplatereratingLockCode- the rerating operation lock codelistener- the listener in charge for processing the results or exceptions of this operation.
-
charge
public void charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, String reratingLockCode, ChargeExecutionContext context, ChargeEventListener listener) Asks the server to charge the specified chargeable item for the specified user service ID and service ID at the specified date.
The result can be retrieved using the methodPurchaseOrder.getChargingResults(). The content of the result can be configured using the specifiedcontext.
This operation may conflict with the prerating feature. Do not use this operation if some preratings are not post-rated.- Parameters:
ci- theChargeableItemto chargeserviceID- the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID- the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate- the date the service was consumed by the end customerreratingLockCode- the rerating operation lock codecontext- the conditions under which the charge operation must be executed (can benull)listener- the listener in charge for processing the results or exceptions of this operation.
-
charge
public void charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, ChargeEventListener listener) Asks the server to rate the specified chargeable item for the specified user service ID and service ID at the specified date. This operation may conflict with the pre-rating feature. Don't use this operation if some pre-ratings are not post-rated.- Parameters:
ci- theChargeableItemto rateserviceID- the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID- the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate- the date the service was consumed by the end customerlistener- the listener in charge for processing the results or exceptions of this operation.
-
blankCharge
public void blankCharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts, boolean ft, ChargeEventListener listener) Asks the server to rate (in blank mode) the specified chargeable item for the specified user service ID and the specified service ID at the specified date. This operation is equivalent to charge operation but the blank mode means that no data is committed to the database. WARNING: if the transaction processor doesn't take care about the DB transaction (transaction processor which stores the transactions into a file by example), the transaction processor action will not be rollbacked.- Parameters:
ci- theChargeableItemto rate.serviceID- the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID- the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate- the date the service was consumed by the end customerts- the transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- sets if the returned transactions must be filtered according to thetransactionTemplatelistener- the listener in charge for processing the results or exceptions of this operation.
-
guiderLookup
public void guiderLookup(String serviceID, String userServiceID, Date consumptionDate, GuidingServiceClientListener listener) See theBatchServiceClient.guiderLookup(java.lang.String, java.lang.String, java.util.Date)method for more information and consider also thenecessary listener.- Parameters:
serviceID- The service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID- The user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate- The date the service was consumed by the end customerlistener- Thelistenerresponsible for processing the results or exceptions of this operation request.
-
guiderLookup
See theBatchServiceClient.guiderLookup(com.highdeal.guiding.common.GuidingRequest)method for more information and consider also thenecessary listener. -
guiderLookup
See theBatchServiceClient.guiderLookup(com.highdeal.guiding.common.GuidingRequest[])method for more information and consider also thenecessary listener. -
batchCharge
@Deprecated public void batchCharge(Vector<ChargeParameters> parameters, Long subscriptionID, short partitionID, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode, BatchChargeEventListener listener) Deprecated.Requests the connected SAP CC Core Server system to charge in batch mode a sorted set of chargeable items for the specified user service ID (USID) and service ID (SID) and relating to an already identified subscription. The system returns the resulting purchase orders that includes transactions computed according to thetsparameter.Note
-
The SAP CC system filters the computed transactions according to
the
transaction templatesassigned to the subscribedoffer. - This operation may conflict with prerating operations. Do not use this operation there are some pending prerating operations.
- Parameters:
parameters- The chronological list ofChargeParametersto charge in batch modesubscriptionID- The unique ID of the selected subscriptionpartitionID- The identifier of the rating partitionts- The transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- Optional flag to enable the filtering of resulting transactions according to thetransaction templateconfigured in the subscribed offertm- The #@link TransactionMode transaction mode}reratingLockCode- The rerating operation codelistener- The listener used to process the result of the batch charging operation
-
The SAP CC system filters the computed transactions according to
the
-
batchCharge
@Deprecated public void batchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode, BatchChargeEventListener listener) Deprecated.Requests the connected SAP CC Core Server system to charge in batch mode a sorted set of chargeable items for the specified user service ID (USID) and service ID (SID) and relating to an already identified subscription or charging contract. The system returns the resulting purchase orders that includes transactions computed according to thetsparameter.Note
When dealing with subscriptions:
-
The SAP CC system filters the computed transactions according to
the
transaction templatesassigned to the subscribedoffer. - This operation may conflict with prerating operations. Do not use this operation there are some pending prerating operations.
- Parameters:
parameters- The chronological list ofChargeParametersto charge in batch modesubscriptionOrContractID- The unique ID of the selected subscription or charging contractpartitionID- The identifier of the rating partitionchargeType- Thetype of accessible chargedepending on the scope of the batch charging operation: subscription or charging contractts- The transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- Optional flag to enable the filtering of resulting transactions according to thetransaction templateconfigured in the subscribed offer (only relevant for subscriptions)tm- The #@link TransactionMode transaction mode}reratingLockCode- The rerating operation codelistener- The listener used to process the result of the batch charging operation
-
The SAP CC system filters the computed transactions according to
the
-
batchCharge
public void batchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, long suacID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode, BatchChargeEventListener listener) Requests the connected SAP CC Core Server system to charge in batch mode a sorted set of chargeable items for the specified user service ID (USID) and service ID (SID) and relating to an already identified subscription or charging contract. The system returns the resulting purchase orders that includes transactions computed according to thetsparameter.Note
When dealing with subscriptions:
-
The SAP CC system filters the computed transactions according to
the
transaction templatesassigned to the subscribedoffer. - This operation may conflict with prerating operations. Do not use this operation there are some pending prerating operations.
- Parameters:
parameters- The chronological list ofChargeParametersto charge in batch modesubscriptionOrContractID- The unique ID of the selected subscription or charging contractpartitionID- The identifier of the rating partitionsuacID- The identifier of the subscriber accountchargeType- Thetype of accessible chargedepending on the scope of the batch charging operation: subscription or charging contractts- The transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- Optional flag to enable the filtering of resulting transactions according to thetransaction templateconfigured in the subscribed offer (only relevant for subscriptions)tm- The #@link TransactionMode transaction mode}reratingLockCode- The rerating operation codelistener- The listener used to process the result of the batch charging operation
-
The SAP CC system filters the computed transactions according to
the
-
acquire
public void acquire(List<AcquisitionParameters> parameters, AcquisitionListener listener) throws CommunicationFailureException, ServerFailureException Asks the server to asynchronously execute a list of
acquisition operations.Acquisition parameters contains a
chargeable itemand access information (service identifier, user identifier and consumption date). The acquisition consists in finding the charging contract targeted by the access specified, and then to export the chargeable item with additional information using the CIF, without performing rating or charging, for storage purposes.The acquisition operations are executed in mode most, meaning that if an acquisition operation for a chargeable item fails, the following acquisition operations are executed anyway.
The listener specified as argument is called by the client with a list of
acquisition resultswhen the server responds. Each result corresponds to the acquisition parameters in the same position in the list of parameters specified as argument. If an acquisition operation fails, the corresponding result contains anexceptionwhich contains details on the error.Note:
This operation is not allowed if the CIF of the rater instances does not contain a chargeable item processor.
- Parameters:
parameters- a list ofacquisition parametersto use for the acquisitionlistener- alistenercalled by the client when the server returns the result of the operation- Throws:
CommunicationFailureException- if a communication failure occurs during the acquisition of the chargeable itemsServerFailureException- if an unexpected exception occurs during the acquisition of the chargeable items
-
informStartSubscriptionRerating
@Deprecated public void informStartSubscriptionRerating(String reratingLockCode, long subscriptionId, Date restorationDate, short partitionId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) throws CommunicationFailureException Deprecated.Starts the rerating of a subscription or charging contract.
This operation does the following:
- Lock the subscription or charging contract using the rerating lock code specified, so that it cannot be used by other processes
- Restore the values of the counters of the subscription or charging contract at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
reratingLockCode- the rerating operation codesubscriptionId- the unique identifier of the subscription or charging contract to reraterestorationDate- the date from which the rerating will be performedpartitionId- the partition identifier of the subscription or charging contract to rerateaccessibleChargeType- the type of object on which the rerating is performed (subscriptionorcharging contract)listener- the listener which will be called when the operation is complete or fails- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
informStartSubscriptionRerating
public void informStartSubscriptionRerating(String reratingLockCode, long subscriptionId, Date restorationDate, short partitionId, long suacId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) throws CommunicationFailureException Starts the rerating of a subscription or charging contract.
This operation does the following:
- Lock the subscription or charging contract using the rerating lock code specified, so that it cannot be used by other processes
- Restore the values of the counters of the subscription or charging contract at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
reratingLockCode- the rerating operation codesubscriptionId- the unique identifier of the subscription or charging contract to reraterestorationDate- the date from which the rerating will be performedpartitionId- the partition identifier of the subscription or charging contract to reratesuacId- The identifier of the subscriber account that owns the subscription or the charging contract to rerateaccessibleChargeType- the type of object on which the rerating is performed (subscriptionorcharging contract)listener- the listener which will be called when the operation is complete or fails- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
informStartContractCollectionRerating
@Deprecated public void informStartContractCollectionRerating(String reratingLockCode, short partitionId, Date restorationDate, List<Long> contractIdList, BatchChargeEventListener listener) throws CommunicationFailureException Deprecated.Starts the rerating of a collection of charging contracts.
This operation does the following:
- Lock the charging contracts using the rerating lock code specified, so that they cannot be used by other processes
- Restore the values of the counters of the charging contracts at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
reratingLockCode- the rerating operation codepartitionId- the partition identifier of the charging contracts to reraterestorationDate- the date from which the rerating will be performedcontractIdList- the list of unique identifiers of the charging contracts to reratelistener- the listener which will be called when the operation is complete or fails- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
informStartContractCollectionRerating
public void informStartContractCollectionRerating(String reratingLockCode, short partitionId, long suacId, Date restorationDate, List<Long> contractIdList, BatchChargeEventListener listener) throws CommunicationFailureException Starts the rerating of a collection of charging contracts.
This operation does the following:
- Lock the charging contracts using the rerating lock code specified, so that they cannot be used by other processes
- Restore the values of the counters of the charging contracts at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
reratingLockCode- the rerating operation codepartitionId- the partition identifier of the charging contracts to reratesuacId- The identifier of the subscriber account that owns the charging contracts to reraterestorationDate- the date from which the rerating will be performedcontractIdList- the list of unique identifiers of the charging contracts to reratelistener- the listener which will be called when the operation is complete or fails- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
informUnlockSubscription
@Deprecated public void informUnlockSubscription(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, BatchChargeEventListener listener) throws CommunicationFailureException Deprecated.Stops the rerating of a subscription.
This operation does the following:
- Optionally activate the subscription until the activate date specified
- Unlock the subscription, so that it can be used by other processes again
- Parameters:
reratingLockCode- the rerating operation codesubscriptionId- the unique identifier of the subscription to reratemaxConsumptionDate- the maximum consumption date of the CDRs rated during the rerating operationactivationDate- the date to be used to activate the subscription (if no date is specified, the activation is not performed)partitionId- the partition identifier of the subscription to reratelistener- the listener which will be called when the operation is complete or fails- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
informStopSubscriptionRerating
@Deprecated public void informStopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) throws CommunicationFailureException Deprecated.Stops the rerating of a subscription or charging contract.
This operation does the following:
- Optionally activate the subscription or charging contract until the activate date specified
- Unlock the subscription or charging contract, so that it can be used by other processes again
- Parameters:
reratingLockCode- the rerating operation codesubscriptionId- the unique identifier of the subscription or charging contract to reratemaxConsumptionDate- the maximum consumption date of the CDRs rated during the rerating operationactivationDate- the date to be used to activate the subscription or charging contract (if no date is specified, the activation is not performed)partitionId- the partition identifier of the subscription or charging contract to rerateaccessibleChargeType- the type of object on which the rerating is performed (subscriptionorcharging contract)listener- the listener which will be called when the operation is complete or fails- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
informStopSubscriptionRerating
public void informStopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, long suacId, AccessibleChargeType accessibleChargeType, BatchChargeEventListener listener) throws CommunicationFailureException Stops the rerating of a subscription or charging contract.
This operation does the following:
- Optionally activate the subscription or charging contract until the activate date specified
- Unlock the subscription or charging contract, so that it can be used by other processes again
- Parameters:
reratingLockCode- the rerating operation codesubscriptionId- the unique identifier of the subscription or charging contract to reratemaxConsumptionDate- the maximum consumption date of the CDRs rated during the rerating operationactivationDate- the date to be used to activate the subscription or charging contract (if no date is specified, the activation is not performed)partitionId- the partition identifier of the subscription or charging contract to reratesuacId- The identifier of the subscriber account that owns the subscription or the charging contract to rerateaccessibleChargeType- the type of object on which the rerating is performed (subscriptionorcharging contract)listener- the listener which will be called when the operation is complete or fails- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
pingReratingOperation
Checks if a rerating operation identified is running.- Parameters:
reratingLockCode- The rerating operation code to check- Returns:
trueif the rerating operation is alive,falseotherwise- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-