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 class
ChargingInstance.ChargingType
Identifies the type of the Charging: reserved or immediate charging.static class
ChargingInstance.Instruction
Type of charging instructions.static class
ChargingInstance.State
Represents 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 void
clearInstruction()
Clears any pending charging instructionChargingInstance.State
getChargingState()
The current state of charging instanceChargingInstance.ChargingType
getChargingType()
The type of charging instancejava.lang.String
getName()
Returns the name assigned to the charging instance, must be unique for the Charging manager instance.ChargingInstance.Instruction
getPendingChargingInstruction()
Determine if this charging instance has any pending charging instruction.org.jainslee.resources.diameter.ro.types.vcb0.ReportingReason
getPendingReportingReason()
Determine if this charging instance has any pending reporting reason.SessionCounters
getSessionCounters()
SessionCounters for the charging instance.boolean
isCreditCheckInProgress()
Indicates whether or not there is a credit check currently in progress.boolean
isSuspended()
Returns true iff this ChargingInstance is currently suspended.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.void
suspend()
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.
-
-