Class SamplePolicySessionRequestLauncher

java.lang.Object
oracle.communication.brm.charging.sdk.AbstractSampleProgram
oracle.communication.brm.charging.sdk.policy.SamplePolicySessionRequestLauncher

public class SamplePolicySessionRequestLauncher extends AbstractSampleProgram
Sample program to send asynchronous PolicySessionRequest to a ECE charging grid.

Eg.

REQUEST:

Operation type = POLICY_SESSION_REQUEST

User identity = 100000

Session Id = 123456789

Product type = VOICE

Request Type = INITIAL

Preferences = [Language, Channel, InvalidPref]

Policy Counters = [USD, INVALID_COUNTER]

RESPONSE:

Status = SUCCESS

Request Type = INITIAL

Session Id = 123456789

Customer Id = 6500001

Common preferences = [Language:English, Channel:EMail]

Product preferences = [VOICE:{1234,[Channel:Fax]}]

Unsupported preferences = [InvalidPref]

Status Report = [VOICE:{1234,[USD:[OfferProfileName, HighQoS]]}]

Failed Policy counters = [INVALID_COUNTER]

Reason code = [PARTIAL_SUBSCRIPTION, INVALID_COUNTER]

  • Constructor Details

    • SamplePolicySessionRequestLauncher

      public SamplePolicySessionRequestLauncher(String userIdentity, String sessionId, PolicySessionRequest.RequestType requestType, String productType, String requestTimeStr, Set<String> preferences, ZonedDateTime expiryTime, List<String> policyCounters)
      Constructor
      Parameters:
      userIdentity - public user identity
      sessionId - session id of the request
      requestType - request type: INITIAL, UPDATE or TERMINATE
      productType - product type
      requestTimeStr - request start time in string format
      preferences - requested preferences
      expiryTime - expiration time of the subscription
      policyCounters - policy counters list
  • Method Details

    • runSample

      protected void runSample() throws Exception
      Description copied from class: AbstractSampleProgram
      To be implemented by each sample program for specific scenario
      Specified by:
      runSample in class AbstractSampleProgram
      Throws:
      Exception - if something goes wrong in the scenario!
    • main

      public static void main(String[] args)
      Main method to start the sample program
      Parameters:
      args - arguments with options

      args[-]: user identity; eg. 10000

      args[-]: request type; eg. INITIAL

      args[-]: session id; eg. SESSION_ID

      args[-]: product type; eg. -p VOICE

      args[-]: requested preferences in ','(comma) separated format; eg. -s Language,Channel

      args[-]: request time eg. -t 2011-01-01T00:01:00

      args[-]: expiry interval time in seconds -e 10000

      args[-]: requested policy counters in ','(comma) separated format; eg. -c USD,FREE_MINUTES