|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.diameter.charging.util.RfAccountingInfo
public class RfAccountingInfo
RfAccountingInfo is a lightweight representation of the Accounting-Request (ACR) command. It includes all of the basic informational elements needed to manage offline charging for Events or Sessions. The Web service client creates an instance of RfAccountingInfo and must set all required fields before initiating a Web service request.
The Rf ACR command is defined in ETSI TS 132 299 V6.9.0 (2006-12) - Diameter charging applications, which references RFC 3588 - Diameter Base Protocol.
Constructor Summary | |
---|---|
RfAccountingInfo()
Constructs an empty RfAccountingInfo object representing the ACR command. |
|
RfAccountingInfo(java.util.List<Avp> avps)
Constructs a RfAccountingInfo object representing the ACR Command. |
Method Summary | |
---|---|
java.lang.Integer |
getAccountingRecordNumber()
Gets the value corresponding to the payload of the {Accounting-Record-Number} Avp. |
java.lang.Integer |
getAcctInterimInterval()
Gets the value corresponding to the payload of the [Acct-Interim-Interval] Avp. |
java.lang.String |
getDestinationHost()
Gets the value corresponding to the payload of the [Destination-Host] Avp. |
java.lang.String |
getDestinationRealm()
Gets the value corresponding to the payload of the {Destination-Realm} Avp. |
java.lang.Long |
getEventTimestamp()
Gets the value corresponding to the payload of the [Event-Timestamp] Avp. |
java.lang.Integer |
getOriginStateId()
Gets the value corresponding to the payload of the [Origin-State-Id] Avp. |
ServiceInformation |
getServiceInformation()
Gets the value corresponding to the payload of the [Service-Information] Avp. |
java.lang.String |
getSessionId()
Gets the value corresponding to the payload of the {Session-Id} Avp. |
java.lang.String |
getUserName()
Gets the value corresponding to the payload of the [User-Name] Avp. |
void |
setAccountingRecordNumber(java.lang.Integer accountingRecordNumber)
Sets the value corresponding to the payload of the {Accounting-Record-Number} Avp. |
void |
setAcctInterimInterval(java.lang.Integer acctInterimInterval)
Sets the value corresponding to the payload of the [Acct-Interim-Interval] Avp. |
void |
setDestinationHost(java.lang.String destinationHost)
Sets the value corresponding to the payload of the [Destination-Host] Avp. |
void |
setDestinationRealm(java.lang.String destinationRealm)
Sets the value corresponding to the payload of the [Destination-Realm] Avp. |
void |
setEventTimestamp(java.lang.Long eventTimestamp)
Sets the value corresponding to the payload of the [Event-Timestamp] Avp. |
void |
setOriginStateId(java.lang.Integer originStateId)
Sets the value corresponding to the payload of the [Origin-State-Id] Avp. |
void |
setServiceInformation(ServiceInformation serviceInfo)
Sets the value corresponding to the payload of the [Service-Information] Avp. |
void |
setSessionId(java.lang.String sessionId)
Sets the value corresponding to the payload of the {Session-Id} Avp. |
void |
setUserName(java.lang.String userName)
Sets the value corresponding to the payload of the [User-Name] Avp. |
java.util.Vector |
toAvps()
Transforms a RfAccountingInfo object into a Vector of Avps that forms the body of the ACR Diameter Packet. |
void |
validate()
Validates the members of the RfAccountingInfo object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RfAccountingInfo()
public RfAccountingInfo(java.util.List<Avp> avps) throws AvpTransformationException
The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of RfAccountingInfo, the member will be populated with the Avp value during construction. If an Avp code is unknown, the value will be silently discarded.
avps
- a list of Avps that can appear in the RAR
AvpTransformationException
- if the Avp value is in an unexpected format.Method Detail |
---|
public java.lang.Integer getAccountingRecordNumber()
Identifies this record within one session. The combination of Session-Id and Accounting-Record-Number AVPs is globally unique, and can be used in matching accounting records with confirmations. An easy way to produce unique numbers is to set the value to 0 for records of type EVENT_RECORD and START_RECORD, and set the value to 1 for the first INTERIM_RECORD, 2 for the second, and so on until the value for STOP_RECORD is one more than for the last INTERIM_RECORD.
public void setAccountingRecordNumber(java.lang.Integer accountingRecordNumber)
ccRequestNumber
- the value corresponding to the payload of the {Accounting-Record-Number} Avp.public java.lang.Integer getAcctInterimInterval()
Obtains the value of acctInterimInterval. The omission of this value or its inclusion with Value field set to 0 means that EVENT_RECORD, START_RECORD,and STOP_RECORD are produced, as appropriate for the service. The inclusion of the Value set to a non-zero value means that INTERIM_RECORD records MUST be produced between the START_RECORD and STOP_RECORD records. [Acct-Interim-Interval]
public void setAcctInterimInterval(java.lang.Integer acctInterimInterval)
ccRequestNumber
- the value corresponding to the payload of the [Acct-Interim-Interval] Avp.public java.lang.String getDestinationHost()
Contains the host the message is to be routed to.
public void setDestinationHost(java.lang.String destinationHost)
ccRequestNumber
- the value corresponding to the payload of the [Destination-Host] Avp.public java.lang.String getDestinationRealm()
Contains the realm the message is to be routed to.
public void setDestinationRealm(java.lang.String destinationRealm)
ccRequestNumber
- the value corresponding to the payload of the [Destination-Realm] Avp.public java.lang.Long getEventTimestamp()
Obtains the value of eventTimeStamp. The event time stamp is defined as the difference in milliseconds between the current time and midnight, January 1, 1970 UTC.
public void setEventTimestamp(java.lang.Long eventTimestamp)
ccRequestNumber
- the value corresponding to the payload of the [Event-Timestamp] Avp.public java.lang.Integer getOriginStateId()
Obtains the value of originStateId. This is a monotonically increasing value that is advanced whenever a Diameter entity restarts with loss of previous state, for example upon reboot. A Diameter entity issuing it MUST create a higher value each time its state is reset. A Diameter entity MAY set it to the time of startup, or it MAY use an incrementing counter retained in non-volatile memory across restarts. [Origin-State-Id]
public void setOriginStateId(java.lang.Integer originStateId)
ccRequestNumber
- the value corresponding to the payload of the [Origin-State-Id] Avp.public ServiceInformation getServiceInformation()
Contains service specific diameter charging information. Service-Information [ PS-Information ] [ WLAN-Information ] [ IMS-Information ] [ PoC-Information ] [ MBMS-Information ]
public void setServiceInformation(ServiceInformation serviceInfo)
ccRequestNumber
- the value corresponding to the payload of the [Service-Information] Avp.public java.lang.String getSessionId()
public void setSessionId(java.lang.String sessionId)
ccRequestNumber
- the value corresponding to the payload of the {Session-Id} Avp.public java.lang.String getUserName()
Identifies a user in the accounting server in a format consistent with the NAI specification.
public void setUserName(java.lang.String userName)
ccRequestNumber
- the value corresponding to the payload of the [User-Name] Avp.public void validate() throws DiameterRfException
DiameterRfException
- if a member of RfAccountingInfo is in an unexpected format.public java.util.Vector toAvps() throws AvpTransformationException
All non-null members of RfAccountingInfo will be created as Avps in the Vector.
AvpTransformationException
- if a member of RfAccountingInfo is in an
unexpected format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |