Package com.opencloud.sentinel.charging
Interface ChargingManager
-
public interface ChargingManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COMPONENT_NAME_KEY
ChargingManager component name key, used inFailedInstruction
.static java.lang.String
COMPONENT_TYPE_NAME
ChargingManager component type value, used inFailedInstruction
.static java.lang.String
REQUEST_TYPE_KEY
Request Type key, used inFailedInstruction
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImmediateChargingInstance
createImmediateChargingInstance(java.lang.String name)
Create a new Immediate Charging Instance in the ChargingManager.ReservationChargingInstance
createReservationInstance(java.lang.String name)
Create a new ReservationChargingInstance in the ChargingManager.void
enableSessionReplication()
Enable session replication for all ReservationChargingInstancesChargingInstance
getChargingInstance(java.lang.String name)
Determine the charging instance which the ChargingManager holds for a name for this session or null if there is no such instance.java.util.Collection<ChargingInstance>
getChargingInstances()
Returns Collection of managed Charging Instances for this Sentinel Session.void
startReplicatingIfEnabled()
Start replicating any charging instances that connected to an OCS since replication was enabled
-
-
-
Field Detail
-
COMPONENT_TYPE_NAME
static final java.lang.String COMPONENT_TYPE_NAME
ChargingManager component type value, used inFailedInstruction
.- See Also:
- Constant Field Values
-
COMPONENT_NAME_KEY
static final java.lang.String COMPONENT_NAME_KEY
ChargingManager component name key, used inFailedInstruction
.- See Also:
- Constant Field Values
-
REQUEST_TYPE_KEY
static final java.lang.String REQUEST_TYPE_KEY
Request Type key, used inFailedInstruction
.- See Also:
- Constant Field Values
-
-
Method Detail
-
createReservationInstance
ReservationChargingInstance createReservationInstance(java.lang.String name) throws DuplicateNameException
Create a new ReservationChargingInstance in the ChargingManager. This instance can be used for Session Charging with Unit Reservation, and Event Charging with Unit Reservation.- Parameters:
name
- the name must be unique for this Sentinel session. Names are case sensitive.- Returns:
- created event charging instance.
- Throws:
DuplicateNameException
- If charging instance already exists with the supplied name.
-
createImmediateChargingInstance
ImmediateChargingInstance createImmediateChargingInstance(java.lang.String name) throws DuplicateNameException
Create a new Immediate Charging Instance in the ChargingManager.- Parameters:
name
- the name must be unique for this Sentinel session. Names are case sensitive.- Returns:
- created immediate charging instance.
- Throws:
DuplicateNameException
- If charging instance already exists with the supplied name.
-
getChargingInstance
ChargingInstance getChargingInstance(java.lang.String name)
Determine the charging instance which the ChargingManager holds for a name for this session or null if there is no such instance.- Parameters:
name
- Unique name associated with theChargingInstance
.- Returns:
- ChargingInstance associated with given name or null if no such instance.
-
getChargingInstances
java.util.Collection<ChargingInstance> getChargingInstances()
Returns Collection of managed Charging Instances for this Sentinel Session.- Returns:
- Collection of
ChargingInstance
s.
-
enableSessionReplication
void enableSessionReplication()
Enable session replication for all ReservationChargingInstances
-
startReplicatingIfEnabled
void startReplicatingIfEnabled()
Start replicating any charging instances that connected to an OCS since replication was enabled
-
-