Extension SDK for BEA WebLogic Network Gatekeeper
Content based charging
The following sections contain descriptions of plug-ins of Content based charging type:
Network plug-in
Content based charging interfaces
All subscriber profile interfaces are defined in the file bea\wlng21\esdk\idl\plugin_if\charging\ChargingResource_IF.idl
Figure 11-1 Content based charging interface
Interfaces that should be implemented by the plug-in are listed in the table below.
Table 11-1 Interfaces that shall be implemented by a plug-in for Content based charging
Interface
|
Description
|
Resource
|
Initial object obtained from Plug-in Manager. Base interface implemented by all plug-ins.
|
ChargingResource
|
Manager object that is used to create sessions towards a Content based charging plug-in.
|
IrChargingSession
|
The Charging session interface provides functions to reserve, debit and credit user accounts.It also provides functions for rating requstes.There are separate functions that operate on units, volumes and amounts.
|
Interfaces that are implemented by the ESPA Content based charging SC.
Table 11-2 Interfaces that are implemented by the ESPA Content based charging SC, used by a Content based charging plug-in.
Interface
|
Description
|
IrAppChargingSession
|
Call back interface for receiving responses to operations performed via the IrChargingSession interface.
|
ChargingResource
Table 11-3 ChargingResource
Method
|
Description
|
createChargingSessionCtx
|
Creates a Content based charging session.
|
getChargingSessionCtx
|
Retrieves an already created instance of a charging session.
|
IrChargingSession
Table 11-4 IrChargingSession
Method
|
Description
|
creditAmountReq
|
Credits an amount towards the reservation associated with the session.
|
creditUnitReq
|
Credits one or more units towards the reservation associated with the session.
|
debitAmountReq
|
Debits an amount towards the reservation associated with the session.
|
debitUnitReq
|
Debits one or more units towards the reservation associated with the session.
|
directCreditAmountReq
|
Credits an amount directly without affecting the reservation.
|
directCreditUnitReq
|
Credits one or more units directly without affecting the reservation.
|
directDebitAmountReq
|
Debits an amount directly without affecting the reservation.
|
directDebitUnitReq
|
Debits one or more units directly without affecting the reservation.
|
extendLifeTimeReq
|
Request to extend the lifetime of a reservation.
|
getAmountLeft
|
Request to get the remaining amount in a reservation.
|
getLifeTimeLeft
|
Request to get the remaining lifetime of a reservation.
|
getUnitLeft
|
Request to get the remaining units of a reservation.
|
rateReq
|
Request to rate a request.
|
release
|
Releases a Content based charging session and releases any reserved amount or units left in a reservation.
|
reserveAmountReq
|
Reserves an amount from an account
|
reserveUnitReq
|
Reserves one or more units from an account.
|
IrAppChargingSession
Table 11-5 IrAppChargingSession
Method
|
Description
|
creditAmountErr
|
Result of a failed creditAmountReq request. No amount was credited.
|
creditAmountRes
|
Result of a successful creditAmountReq request. Contains the information requested.
|
creditUnitErr
|
Result of a failed creditUnitReq request. No units were credited.
|
creditUnitRes
|
Result of a successful creditUnitReq request.
|
debitAmountErr
|
Result of a failed debitAmountReq request. No amount was debited.
|
debitAmountRes
|
Result of a successful debitAmountReq request.
|
debitUnitErr
|
Result of a failed debitUnitReq request. No units were debited.
|
debitUnitRes
|
Result of a successful debitUnitReq request.
|
directCreditAmountErr
|
Result of a failed directCreditAmountReq request. No amount was debited.
|
directCreditAmountRes
|
Result of a successful directCreditAmountReq request.
|
directCreditUnitErr
|
Result of a failed directCreditUnitReq request. No units were credited.
|
directCreditUnitRes
|
Result of a successful directCreditUnitReq request.
|
directDebitAmountErr
|
Result of a failed directDebitAmountReq request. No amount was credited.
|
directDebitAmountRes
|
Result of a successful directDebitAmountReq request.
|
directDebitUnitErr
|
Result of a failed directDebitUnitReq request. No units were debited.
|
directDebitUnitRes
|
Result of a successful directDebitUnitReq request.
|
extendLifeTimeErr
|
Result of a failed extendLifeTimeReq request. The lifetime was not extended.
|
extendLifeTimeRes
|
Result of a successful extendLifeTimeReq request.
|
rateErr
|
Result of a failed rateReq request. The rating was not performed.
|
rateRes
|
Result of a successful rateReq request.
|
reserveAmountErr
|
Result of a failed reserveAmountReq request. No amount was reserved.
|
reserveAmountRes
|
Result of a successful reserveAmountReq request.
|
reserveUnitErr
|
Result of a failed reserveAmountReq request. No units were reserved.
|
reserveUnitRes
|
Result of a successful reserveAmountReq request.
|
sessionEnded
|
The charging session was ended by the plug-in.
|
Use cases for Content based charging
A Content based charging plug-in only supports operations originating from an application. Network triggered is not supported.
Application-initiated usage of a Content based charging plug-in
The following sequence diagram show a basic interaction between a user of content based charging plug-in and the plug-in.
Figure 11-2 Application-initiated usage of Content based charging plug-in.
Details about the sequence diagram:
- Prior to this sequence the Charging client (for example the content based charging ESPA SC) has received a plug-in. See General usage (application-initiated events).
- The Charging client application performs a createChargingSessionCtx to the implementation of the ChargingResource interface. This interface is implemented in the plug-in.
- The plug-in creates an instance of the IrChargingSession interface and return it to the client. An identifier for the session, along with the interface is returned to the client. A sequence number is also supplied. This sequence number shall be increased for each new request, in order to make sure that the requests are performed in the correct order.
- The Content based charging client orders the plug-in to rate the request. The plug-in returns the rating via rateRes, so the client knows how much to reserve. if the rating failed, rateErr shall be returned.
- The reservation is performed via reserveAmountReq.
- A successful reservation is reported via reserveAmountRes.
- An amount tis debited from the reservation using debitAmountReq.
- The successful debit is reported via debitAmountRes.
- The debited amount was too large, so the account is credited using creditAmountReq, and the successful credit is reported using creditAmountRes.
- The lifetime of the reservation is extended via extendLifeTimeReq, and the successful request is reported via extendLifeTimeRes.
- When all apportions in the session have been performed, the session is released.