public final class SamplePreRatingExtension extends java.lang.Object implements PreRatingExtension
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 and Description |
---|
SamplePreRatingExtension() |
Modifier and Type | Method and Description |
---|---|
void |
execute(PreRatingExtensionContext extensionContext)
This execute method is specific to a PreRatingExtension hook.
|
void |
initialize(ExtensionContext extensionContext)
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.
|
void |
shutdown(ExtensionContext extensionContext)
method is invoked once at ECS Node shutdown time to allow integrators a spot to release any resources that
were acquired by the Extension.
|
public void initialize(ExtensionContext extensionContext) throws ExtensionException
oracle.communication.brm.charging.extensions.framework.ExtensionCallback
initialize
in interface PreRatingExtension
initialize
in interface oracle.communication.brm.charging.extensions.framework.ExtensionCallback<PreRatingExtensionContext>
extensionContext
- the context which exposes objects that are needed at initialization time.ExtensionException
- if a non-recoverable error occurs during initialization.public void execute(PreRatingExtensionContext extensionContext) throws ExtensionException
PreRatingExtension
execute
in interface PreRatingExtension
extensionContext
- context information pertaining to Pre OCS Rating.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.public void shutdown(ExtensionContext extensionContext) throws ExtensionException
oracle.communication.brm.charging.extensions.framework.ExtensionCallback
shutdown
in interface PreRatingExtension
shutdown
in interface oracle.communication.brm.charging.extensions.framework.ExtensionCallback<PreRatingExtensionContext>
extensionContext
- the context which exposes objects that are needed at shutdown time.ExtensionException
- if a non-recoverable error occurs during shutdown.