Class SamplePreRatingExtension

java.lang.Object
oracle.communication.brm.charging.sdk.extensions.SamplePreRatingExtension
All Implemented Interfaces:
PreRatingExtension, oracle.communication.brm.charging.extensions.framework.ExtensionCallback<PreRatingExtensionContext>

public final class SamplePreRatingExtension extends Object implements PreRatingExtension
Sample to show pre extension custom rating logic. Provides a sample logic to modify the input request quantity based on input network type and if customer balance is greater than a predefined amount

CASE 1: If ORIGIN_NETWORK network field is "3G_UTRAN" and USD balance greater than 50 then allow only max of 10 MB for a session OR "4G_UTRAN" and USD balance greater than 50 then allow only max of 100 MB for a session

  • Constructor Details

    • SamplePreRatingExtension

      public SamplePreRatingExtension()
  • Method Details

    • initialize

      public void initialize(ExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: oracle.communication.brm.charging.extensions.framework.ExtensionCallback
      method is invoked once at ECS Node startup time to allow integrators a spot to populate private data members that are required by the extension callback.
      Specified by:
      initialize in interface oracle.communication.brm.charging.extensions.framework.ExtensionCallback<PreRatingExtensionContext>
      Specified by:
      initialize in interface PreRatingExtension
      Parameters:
      extensionContext - the context which exposes objects that are needed at initialization time.
      Throws:
      ExtensionException - if a non-recoverable error occurs during initialization.
    • execute

      public void execute(PreRatingExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: PreRatingExtension
      This execute method is specific to a PreRatingExtension hook. Operator should implement this method to perform their custom logic that is specific to their Pret OCS Rating needs.
      Specified by:
      execute in interface PreRatingExtension
      Parameters:
      extensionContext - context information pertaining to Pre OCS Rating.
      Throws:
      ExtensionException - throw and exception if a non-recoverable error occurs. This exception will be logged and a EXTENSION_ERROR ServiceEvent will be set into the UsageResponse.
    • shutdown

      public void shutdown(ExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: oracle.communication.brm.charging.extensions.framework.ExtensionCallback
      method is invoked once at ECS Node shutdown time to allow integrators a spot to release any resources that were acquired by the Extension.
      Specified by:
      shutdown in interface oracle.communication.brm.charging.extensions.framework.ExtensionCallback<PreRatingExtensionContext>
      Specified by:
      shutdown in interface PreRatingExtension
      Parameters:
      extensionContext - the context which exposes objects that are needed at shutdown time.
      Throws:
      ExtensionException - if a non-recoverable error occurs during shutdown.