Class SampleDiameterGyMultiplyOctetUsageExtension

java.lang.Object
oracle.communication.brm.charging.sdk.extensions.SampleDiameterGyMultiplyOctetUsageExtension
All Implemented Interfaces:
GyExtension, oracle.communication.brm.charging.extensions.framework.ExtensionCallback<ExtensionContext>

public class SampleDiameterGyMultiplyOctetUsageExtension extends Object implements GyExtension
This sample extension shows how to intercept Diameter Gy traffic in order to modify AVP that influence Request and Reply results.
  • Constructor Details

    • SampleDiameterGyMultiplyOctetUsageExtension

      public SampleDiameterGyMultiplyOctetUsageExtension()
  • 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<ExtensionContext>
      Specified by:
      initialize in interface GyExtension
      Parameters:
      extensionContext - the context which exposes objects that are needed at initialization time.
      Throws:
      ExtensionException - if a non-recoverable error occurs during initialization.
    • handleRequestReceived

      public void handleRequestReceived(GyPreProcessorExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: GyExtension
      This method is invoked each time a Diameter Gy Request is received by the ECE DiameterGateway. This extension applies to ALL types of gy traffic. (ie Usage, Topup and BalanceQuery) This method is called prior to creating an ECE UsageRequest from the incoming Gy Request. The supplied context allows access to Request AVPs. Operators can modify the AVPs; or choose to reject the Request altogether and send an immediate response to the calling Diameter Client through the supplied context.
      Specified by:
      handleRequestReceived in interface GyExtension
      Parameters:
      extensionContext - the available context data for this callout.
      Throws:
      ExtensionException - if a non-recoverable error occurs during handleRequestReceived.
    • handlePreOCS

      public void handlePreOCS(GyPreOCSExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: GyExtension
      This method is invoked each time a Diameter Gy Request is received by the ECE DiameterGateway. This extension point applies only to INITIATE, UPDATE, TERMINATE, CANCEL, DEBIT, REFUND and PRICE_ENQUIRY traffic. This method is called after the incoming Gy Request has been dynamically mapped into an ECE Payload. The supplied context allows access to Request AVPs and the mapped ECE Payload. Operators can modify the Payload before the UsageRequest is created and send to the ECE OCS ChargingEngine.
      Specified by:
      handlePreOCS in interface GyExtension
      Parameters:
      extensionContext - the available context data for this callout.
      Throws:
      ExtensionException - if a non-recoverable error occurs during handlePreOCS.
    • handlePostOCS

      public void handlePostOCS(GyPostOCSExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: GyExtension
      This method is invoked each time a Diameter Gy Request is received by the ECE DiameterGateway and rated by the ECE OCS ChargingEngine. This extension point applies only to INITIATE, UPDATE, TERMINATE, CANCEL, DEBIT, REFUND and PRICE_ENQUIRY traffic. This method is called after the ECE Response has been received by the DiameterGateway and has been dynamically mapped back into an Gy Reply. Operators can modify the Gy Reply AVPs before they are send back to the calling client. The supplied context allows access to Reply AVPs, the ECE Response object and the original Gy Request AVPs.
      Specified by:
      handlePostOCS in interface GyExtension
      Parameters:
      extensionContext - the available context data for this callout.
      Throws:
      ExtensionException - if a non-recoverable error occurs during handlePostOCS.
    • handlePostOCS

      public void handlePostOCS(GyPostOCSTopUpExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: GyExtension
      This method is invoked each time a Diameter Gy TOPUP Request is received by the ECE DiameterGateway and processed by the ECE OCS ChargingEngine. This extension point applies only to TOPUP traffic. This method is called after the ECE Response has been received by the DiameterGateway and has been mapped back into an Gy Reply. Operators can modify the Gy Reply AVPs before they are send back to the calling client. The supplied context allows access to Reply AVPs, the ECE Response object and the original Gy Request AVPs.
      Specified by:
      handlePostOCS in interface GyExtension
      Parameters:
      extensionContext - the available context data for this callout.
      Throws:
      ExtensionException - if a non-recoverable error occurs during handlePostOCS.
    • handlePostOCS

      public void handlePostOCS(GyPostOCSBalanceQueryExtensionContext extensionContext) throws ExtensionException
      Description copied from interface: GyExtension
      This method is invoked each time a Diameter Gy BALANCE_QUERY Request is received by the ECE DiameterGateway and processed by the ECE OCS ChargingEngine. This extension point applies only to BALANCE_QUERY traffic. This method is called after the ECE Response has been received by the DiameterGateway and has been mapped back into an Gy Reply. Operators can modify the Gy Reply AVPs before they are send back to the calling client. The supplied context allows access to Reply AVPs, the ECE Response object and the original Gy Request AVPs.
      Specified by:
      handlePostOCS in interface GyExtension
      Parameters:
      extensionContext - the available context data for this callout.
      Throws:
      ExtensionException - if a non-recoverable error occurs during handlePostOCS.
    • 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<ExtensionContext>
      Specified by:
      shutdown in interface GyExtension
      Parameters:
      extensionContext - the context which exposes objects that are needed at shutdown time.
      Throws:
      ExtensionException - if a non-recoverable error occurs during shutdown.