Package com.opencloud.sentinel.charging
Interface ChargingInstance
-
- All Known Subinterfaces:
ImmediateChargingInstance,ReservationChargingInstance
public interface ChargingInstance
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classChargingInstance.ChargingTypeIdentifies the type of the Charging: reserved or immediate charging.static classChargingInstance.InstructionType of charging instructions.static classChargingInstance.StateRepresents the current state of a ChargingInstance, an instance is in the Initial state prior to processing CCA-I, Mid state after processing CCA-I and Final state after credit finalisation is instructed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearInstruction()Clears any pending charging instructionChargingInstance.StategetChargingState()The current state of charging instanceChargingInstance.ChargingTypegetChargingType()The type of charging instancejava.lang.StringgetName()Returns the name assigned to the charging instance, must be unique for the Charging manager instance.ChargingInstance.InstructiongetPendingChargingInstruction()Determine if this charging instance has any pending charging instruction.org.jainslee.resources.diameter.ro.types.vcb0.ReportingReasongetPendingReportingReason()Determine if this charging instance has any pending reporting reason.SessionCountersgetSessionCounters()SessionCounters for the charging instance.booleanisCreditCheckInProgress()Indicates whether or not there is a credit check currently in progress.booleanisSuspended()Returns true iff this ChargingInstance is currently suspended.voidresume(boolean autoUpdateCounters)On calling resume all session counters associated with this charging instance will have the cumulativeSuspendedDuration field updated if autoUpdateCounters is true.voidsuspend()The SuspensionStartTime field for all counters in this instance will be set to the current time.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name assigned to the charging instance, must be unique for the Charging manager instance.- Returns:
- Unique name for this charging instance.
-
getChargingType
ChargingInstance.ChargingType getChargingType()
The type of charging instance- Returns:
- ChargingType for this charging instance.
-
getChargingState
ChargingInstance.State getChargingState()
The current state of charging instance- Returns:
- State for this charging instance.
-
getSessionCounters
SessionCounters getSessionCounters()
SessionCounters for the charging instance.- Returns:
- SessionCounters for this charging instance.
-
getPendingChargingInstruction
ChargingInstance.Instruction getPendingChargingInstruction()
Determine if this charging instance has any pending charging instruction.- Returns:
- pending instruction.
-
getPendingReportingReason
org.jainslee.resources.diameter.ro.types.vcb0.ReportingReason getPendingReportingReason()
Determine if this charging instance has any pending reporting reason.- Returns:
- reporting reason.
-
clearInstruction
void clearInstruction()
Clears any pending charging instruction
-
suspend
void suspend()
The SuspensionStartTime field for all counters in this instance will be set to the current time.
-
resume
void resume(boolean autoUpdateCounters)
On calling resume all session counters associated with this charging instance will have the cumulativeSuspendedDuration field updated if autoUpdateCounters is true.- Parameters:
autoUpdateCounters- false if intending to manually update cumulativeSuspendedDuration, true for automatic updating of cumulativeSuspendedDuration in all associated session counters
-
isSuspended
boolean isSuspended()
Returns true iff this ChargingInstance is currently suspended.- Returns:
- true iff this ChargingInstance is currently suspended.
-
isCreditCheckInProgress
boolean isCreditCheckInProgress()
Indicates whether or not there is a credit check currently in progress. This generally means that a CCA is pending.- Returns:
- true iff there is a credit check currently in progress.
-
-