Package com.opencloud.sentinel.charging
Interface ChargingManager
-
public interface ChargingManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMPONENT_NAME_KEYChargingManager component name key, used inFailedInstruction.static java.lang.StringCOMPONENT_TYPE_NAMEChargingManager component type value, used inFailedInstruction.static java.lang.StringREQUEST_TYPE_KEYRequest Type key, used inFailedInstruction.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImmediateChargingInstancecreateImmediateChargingInstance(java.lang.String name)Create a new Immediate Charging Instance in the ChargingManager.ReservationChargingInstancecreateReservationInstance(java.lang.String name)Create a new ReservationChargingInstance in the ChargingManager.voidenableSessionReplication()Enable session replication for all ReservationChargingInstancesChargingInstancegetChargingInstance(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.voidstartReplicatingIfEnabled()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
ChargingInstances.
-
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
-
-