Oracle Application Server Wireless Java API Reference
B14043-01


oracle.wireless.billing
Class BillingController

java.lang.Object
  extended byoracle.wireless.billing.BillingController


public class BillingController
extends java.lang.Object

Billing controller handles the billing system interaction for the components


Method Summary
BillingResult cancelService(BillingContext context, java.lang.String referenceId)
Called to inform the billing system of cancellation of the service request
BillingResult cancelService(ServiceDetailRecord sdr)
Called to inform the billing system of cancellation of the service request
BillingTransaction getCurrentTransaction()
The transaction could be set by the driver or collector or application
static BillingController getInstance()
Returns the current instance of BillingController
boolean isBillingEnabled()
returns true/false config parameter to indicate that billing is enabled
BillingResult postService(BillingContext context)
Called to inform the billing system after the service request This call is made to create SDR.
BillingResult postService(BillingContext context, java.lang.String referenceId)
Called to inform the billing system after the service request This call is made to create SDR and set the reference id.
BillingResult postService(ServiceDetailRecord sdr)
Called to inform the billing system after the service request The service detail record passed here is the one returned during the the preService() The SDR is logged to the database before contacting the billing system
BillingResult preService(BillingContext context)
Called to inform the billing system before the service request
void setCurrentTransaction(BillingTransaction transaction)
Sets the current billing transaction to the specified value
static void setRegisterMessagingStatusListener(StatusListener statusListener)
Registers a messaging status listener with the messaging server to getting message status callbacks.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

cancelService

public BillingResult cancelService(BillingContext context,
                                   java.lang.String referenceId)
                            throws BillingException
Called to inform the billing system of cancellation of the service request
Parameters:
context - The billing context passed to create the service detail record
Returns:
BillingResult the billing result containing the SDR passed to the billing system and the billing status. A null is permitted to allow integrators to bypass billing for a particular component or service.
Throws:
BillingException - Incase of any failure

cancelService

public BillingResult cancelService(ServiceDetailRecord sdr)
                            throws BillingException
Called to inform the billing system of cancellation of the service request
Parameters:
sdr - The service detail record containing the billing reference id
Returns:
BillingResult the billing result containing the SDR passed to the billing system and the billing status. A null is permitted to allow integrators to bypass billing for a particular component or service.
Throws:
BillingException - Incase of any failure

getCurrentTransaction

public BillingTransaction getCurrentTransaction()
The transaction could be set by the driver or collector or application
Returns:
BillingTransaction returns the current trasaction

getInstance

public static BillingController getInstance()
Returns the current instance of BillingController
Returns:
the current instance of BillingController

isBillingEnabled

public boolean isBillingEnabled()
returns true/false config parameter to indicate that billing is enabled
Returns:
true if billing is enabled

postService

public BillingResult postService(BillingContext context)
                          throws BillingException
Called to inform the billing system after the service request This call is made to create SDR. If the SDR returned from the preService() is available then use the api which accepts the SDR as parameter The SDR is logged to the database before contacting the billing system
Parameters:
context - The billing context passed to create the service detail record
Returns:
BillingResult the billing result containing the SDR passed to the billing system and the billing status. A null is permitted to allow integrators to bypass billing for a particular component or service.
Throws:
BillingException - Incase of any failure

postService

public BillingResult postService(BillingContext context,
                                 java.lang.String referenceId)
                          throws BillingException
Called to inform the billing system after the service request This call is made to create SDR and set the reference id. If the SDR returned from the preService() is available then use the api which accepts the SDR as parameter The SDR is logged to the database before contacting the billing system
Parameters:
context - The billing context passed to create the service detail record
referenceId - The billing reference id returned by billling system during preService
Returns:
BillingResult the billing result containing the SDR passed to the billing system and the billing status. A null is permitted to allow integrators to bypass billing for a particular component or service.
Throws:
BillingException - Incase of any failure

postService

public BillingResult postService(ServiceDetailRecord sdr)
                          throws BillingException
Called to inform the billing system after the service request The service detail record passed here is the one returned during the the preService() The SDR is logged to the database before contacting the billing system
Parameters:
sdr - The service detail record created during the preService() call. If the component doesn't have the SDR created during preService - the overloaded api can be used
Returns:
BillingResult the billing result containing the SDR passed to the billing system and the billing status. A null is permitted to allow integrators to bypass billing for a particular component or service.
Throws:
BillingException - Incase of any failure

preService

public BillingResult preService(BillingContext context)
                         throws BillingException
Called to inform the billing system before the service request
Parameters:
context - The billing context passed to create the service detail record
Returns:
BillingResult the billing result containing the SDR passed to the billing system and the billing status. A null is permitted to allow integrators to bypass billing for a particular component or service.
Throws:
BillingException - Incase of any failure

setCurrentTransaction

public void setCurrentTransaction(BillingTransaction transaction)
Sets the current billing transaction to the specified value
Parameters:
transaction - the new value of BillingTransaction

setRegisterMessagingStatusListener

public static void setRegisterMessagingStatusListener(StatusListener statusListener)
Registers a messaging status listener with the messaging server to getting message status callbacks. Register listener before messenger starts up - possible during driver initialization
Parameters:
statusListener - the status listener object which implements the StatusListener interface

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.