Revision: 14969
Author: brainslog
Date: Tue Nov 2 10:02:13 2010
Log: Improve sessions and messages with all relevant setter/getters - Stack
Base
Update Issue 1257
Commited Stack Base changes
http://code.google.com/p/mobicents/source/detail?r=14969
Modified:
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/Answer.java
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/AvpSet.java
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/Request.java
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppAnswerEvent.java
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppEvent.java
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppRequestEvent.java
=======================================
---
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/Answer.java
Wed Oct 15 08:14:03 2008
+++
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/Answer.java
Tue Nov 2 10:02:13 2010
@@ -9,16 +9,16 @@
package org.jdiameter.api;
/**
- * A Answer message is sent by a recipient of Request once it has received
and interpreted the Request.
- * Answer are contain a Status-Code and a other AVPs in message body.
+ * An Answer message is sent by a recipient of Request once it has
received and interpreted the Request.
+ * Answers contain a Result-Code AVP and other AVPs in message body.
* @version 1.5.1 Final
*/
public interface Answer extends Message {
- /**
- * @return ResultCode Avp from message
- */
- public Avp getResultCode();
+ /**
+ * @return ResultCode Avp from message
+ */
+ public Avp getResultCode();
}
=======================================
---
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/AvpSet.java
Wed Oct 15 08:14:03 2008
+++
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/AvpSet.java
Tue Nov 2 10:02:13 2010
@@ -23,770 +23,770 @@
public interface AvpSet extends Iterable<Avp>, Serializable, Wrapper {
- /**
- * get AVP by code
- * @param avpCode code of Avp
- * @return Avp instance
- */
- Avp getAvp(int avpCode);
-
- /**
- * get AVP by position
- * @param index position of Avp
- * @return Avp instance
- */
- Avp getAvpByIndex(int index);
-
- /**
- * get AVP by code
- * @param avpCode code of Avp
- * @param vendorId vendor of Avp
- * @return Avp instance
- */
- Avp getAvp(int avpCode, long vendorId);
-
- /**
- * get AVP by code
- * @param avpCode code of Avp
- * @return array Avp instance
- */
- AvpSet getAvps(int avpCode);
-
- /**
- * get AVP by code
- * @param avpCode code of Avp
- * @param vendorId vendor of Avp
- * @return array Avp instance
- */
- AvpSet getAvps(int avpCode, long vendorId);
-
- /**
- * Remove AVPs with avpCode
- * @param avpCode code of Avp
- * @return array of removed Avps instance
- */
- AvpSet removeAvp(int avpCode);
-
- /**
- * Remove Avp by Avp index
- * @param index Avp position
- * @return Avp instance
- */
- Avp removeAvpByIndex(int index);
-
- /**
- * Return count of top Avps
- * @return size of top Avps
- */
- int size();
-
- /**
- * Return array of avp
- * @return array of avp
- */
- Avp[] asArray();
-
- /**
- * Append avp array as value
- * @param value avp array
- */
- void addAvp(Avp... value);
-
- /**
- * Append array of avps
- * @param value avp array from AvpSet container
- */
- void addAvp(AvpSet value);
-
- /**
- * Append byte[] AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp addAvp(int avpCode, byte[] value);
-
- /**
- * Append byte[] AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, byte[] value, boolean mFlag, boolean pFlag);
-
- /**
- * Append byte[] AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, byte[] value, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Append int AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp addAvp(int avpCode, int value);
-
- /**
- * Append int AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, int value, boolean mFlag, boolean pFlag);
-
- /**
- * Append int AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, int value, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Append long(integer64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp addAvp(int avpCode, long value);
-
- /**
- * Append long(integer64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, long value, boolean mFlag, boolean pFlag);
-
- /**
- * Append long(integer64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, long value, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Append long(integer64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param asUnsignedInt32 true if value is unisignet integer 32 type
- * @return Avp instance
- */
- Avp addAvp(int avpCode, long value, boolean asUnsignedInt32);
-
- /**
- * Append long(integer64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asUnsignedInt32 true if value is unisignet integer 32 type
- * @return Avp instance
- */
- Avp addAvp(int avpCode, long value, boolean mFlag, boolean pFlag,
boolean asUnsignedInt32);
-
- /**
- * Append long(integer64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asUnsignedInt32 true if value is unisignet integer 32 type
- * @return Avp instance
- */
- Avp addAvp(int avpCode, long value, long vendorId, boolean mFlag,
boolean pFlag, boolean asUnsignedInt32);
-
- /**
- * Append float AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp addAvp(int avpCode, float value);
-
- /**
- * Append float AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, float value, boolean mFlag, boolean pFlag);
-
- /**
- * Append float AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, float value, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Append double(float64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp addAvp(int avpCode, double value);
-
- /**
- * Append double(float64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, double value, boolean mFlag, boolean pFlag);
-
- /**
- * Append double(float64) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, double value, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Append String(UTF-8 or Octet) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param asOctetString true if it octet string
- * @return Avp instance
- */
- Avp addAvp(int avpCode, String value, boolean asOctetString);
-
- /**
- * Append String(UTF-8 or Octet) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asOctetString true if it octet string
- * @return Avp instance
- */
- Avp addAvp(int avpCode, String value, boolean mFlag, boolean pFlag,
boolean asOctetString);
-
- /**
- * Append String(UTF-8 or Octet) AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asOctetString true if it octet string
- * @return Avp instance
- */
- Avp addAvp(int avpCode, String value, long vendorId, boolean mFlag,
boolean pFlag, boolean asOctetString);
-
- /**
- * Append URI AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp addAvp(int avpCode, URI value);
-
- /**
- * Append URI AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, URI value, boolean mFlag, boolean pFlag);
-
- /**
- * Append URI AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, URI value, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Append Address AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp addAvp(int avpCode, InetAddress value);
-
- /**
- * Append Address AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, InetAddress value, boolean mFlag, boolean
pFlag);
-
- /**
- * Append Address AVP
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, InetAddress value, long vendorId, boolean
mFlag, boolean pFlag);
-
- /**
- * Append Diameter Time AVP
- * @param avpCode code of Avp
- * @param date value
- * @return Avp instance
- */
- Avp addAvp(int avpCode, Date date);
-
- /**
- * Append Diameter Time AVP
- * @param avpCode code of Avp
- * @param date value
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, Date date, boolean mFlag, boolean pFlag);
-
- /**
- * Append Diameter Time AVP
- * @param avpCode code of Avp
- * @param date value
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp addAvp(int avpCode, Date date, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Append Grouped AVP
- * @param avpCode code of Avp
- * @return AvpSet instance
- */
- AvpSet addGroupedAvp(int avpCode);
-
- /**
- * Append Grouped AVP
- * @param avpCode code of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return AvpSet instance
- */
- AvpSet addGroupedAvp(int avpCode, boolean mFlag, boolean pFlag);
-
- /**
- * Append Grouped AVP
- * @param avpCode code of Avp
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return AvpSet instance
- */
- AvpSet addGroupedAvp(int avpCode, long vendorId, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert AvpSet
- * @param index index of inserted avp
- * @param value avp array
- */
- void insertAvp(int index, Avp... value);
-
- /**
- * Insert AvpSet
- * @param index index of inserted avp
- * @param value avp array from AvpSet container
- */
- void insertAvp(int index, AvpSet value);
-
- /**
- * Insert byte[] AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, byte[] value);
-
- /**
- * Insert byte[] AVP
- * @param avpCode code of Avp
- * @param index index of inserted avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, byte[] value, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert byte[] AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, byte[] value, long vendorId,
boolean mFlag, boolean pFlag);
-
- /**
- * Insert int AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp insertAvp(int index,int avpCode, int value);
-
- /**
- * Insertint AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, int value, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert int AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, int value, long vendorId,
boolean mFlag, boolean pFlag);
-
- /**
- * Insert long(integer64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, long value);
-
- /**
- * Insert long(integer64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, long value, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert long(integer64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, long value, long vendorId,
boolean mFlag, boolean pFlag);
-
- /**
- * Insert long(integer64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param asUnsignedInt32 true if value is unisignet integer 32 type
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, long value, boolean
asUnsignedInt32);
-
- /**
- * Insert long(integer64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asUnsignedInt32 true if value is unisignet integer 32 type
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, long value, boolean mFlag,
boolean pFlag, boolean asUnsignedInt32);
-
- /**
- * Insert long(integer64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asUnsignedInt32 true if value is unisignet integer 32 type
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, long value, long vendorId,
boolean mFlag, boolean pFlag, boolean asUnsignedInt32);
-
- /**
- * Insert float AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, float value);
-
- /**
- * Insert float AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, float value, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert float AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, float value, long vendorId,
boolean mFlag, boolean pFlag);
-
- /**
- * Insert double(float64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, double value);
-
- /**
- * Insert double(float64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, double value, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert double(float64) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, double value, long vendorId,
boolean mFlag, boolean pFlag);
-
- /**
- * Insert String(UTF-8 or Octet) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param asOctetString true if it octet string
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, String value, boolean
asOctetString);
-
- /**
- * Insert String(UTF-8 or Octet) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asOctetString true if it octet string
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, String value, boolean mFlag,
boolean pFlag, boolean asOctetString);
-
- /**
- * Insert String(UTF-8 or Octet) AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @param asOctetString true if it octet string
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, String value, long vendorId,
boolean mFlag, boolean pFlag, boolean asOctetString);
-
- /**
- * Insert URI AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, URI value);
-
- /**
- * Insert URI AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, URI value, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert URI AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, URI value, long vendorId,
boolean mFlag, boolean pFlag);
-
- /**
- * Insert Address AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, InetAddress value);
-
- /**
- * Insert Address AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, InetAddress value, boolean
mFlag, boolean pFlag);
-
- /**
- * Insert Address AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param value Avp data
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, InetAddress value, long
vendorId, boolean mFlag, boolean pFlag);
-
- /**
- * Insert Diameter Time AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param date value
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, Date date);
-
- /**
- * Insert Diameter Time AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param date value
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, Date date, boolean mFlag,
boolean pFlag);
-
- /**
- * Insert Diameter Time AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param date value
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return Avp instance
- */
- Avp insertAvp(int index, int avpCode, Date date, long vendorId,
boolean mFlag, boolean pFlag);
-
- /**
- * Insert Grouped AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @return AvpSet instance
- */
- AvpSet insertGroupedAvp(int index, int avpCode);
-
- /**
- * Insert Grouped AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return AvpSet instance
- */
- AvpSet insertGroupedAvp(int index, int avpCode, boolean mFlag, boolean
pFlag);
-
- /**
- * Insert Grouped AVP
- * @param index index of inserted avp
- * @param avpCode code of Avp
- * @param vendorId vendor of Avp
- * @param mFlag true set M flag/false clear M flag in header Avp
- * @param pFlag true set P flag/false clear P flag in header Avp
- * @return AvpSet instance
- */
- AvpSet insertGroupedAvp(int index, int avpCode, long vendorId, boolean
mFlag, boolean pFlag);
+ /**
+ * get AVP by code
+ * @param avpCode code of Avp
+ * @return Avp instance
+ */
+ Avp getAvp(int avpCode);
+
+ /**
+ * get AVP by position
+ * @param index position of Avp
+ * @return Avp instance
+ */
+ Avp getAvpByIndex(int index);
+
+ /**
+ * get AVP by code
+ * @param avpCode code of Avp
+ * @param vendorId vendor of Avp
+ * @return Avp instance
+ */
+ Avp getAvp(int avpCode, long vendorId);
+
+ /**
+ * get AVP by code
+ * @param avpCode code of Avp
+ * @return array Avp instance
+ */
+ AvpSet getAvps(int avpCode);
+
+ /**
+ * get AVP by code
+ * @param avpCode code of Avp
+ * @param vendorId vendor of Avp
+ * @return array Avp instance
+ */
+ AvpSet getAvps(int avpCode, long vendorId);
+
+ /**
+ * Remove AVPs with avpCode
+ * @param avpCode code of Avp
+ * @return array of removed Avps instance
+ */
+ AvpSet removeAvp(int avpCode);
+
+ /**
+ * Remove Avp by Avp index
+ * @param index Avp position
+ * @return Avp instance
+ */
+ Avp removeAvpByIndex(int index);
+
+ /**
+ * Return count of top Avps
+ * @return size of top Avps
+ */
+ int size();
+
+ /**
+ * Return array of avp
+ * @return array of avp
+ */
+ Avp[] asArray();
+
+ /**
+ * Append avp array as value
+ * @param value avp array
+ */
+ void addAvp(Avp... value);
+
+ /**
+ * Append array of avps
+ * @param value avp array from AvpSet container
+ */
+ void addAvp(AvpSet value);
+
+ /**
+ * Append byte[] AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, byte[] value);
+
+ /**
+ * Append byte[] AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, byte[] value, boolean mFlag, boolean pFlag);
+
+ /**
+ * Append byte[] AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param vendorId vendor of Avp
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, byte[] value, long vendorId, boolean mFlag,
boolean pFlag);
+
+ /**
+ * Append int AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, int value);
+
+ /**
+ * Append int AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, int value, boolean mFlag, boolean pFlag);
+
+ /**
+ * Append int AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param vendorId vendor of Avp
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, int value, long vendorId, boolean mFlag, boolean
pFlag);
+
+ /**
+ * Append long(integer64) AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, long value);
+
+ /**
+ * Append long(integer64) AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, long value, boolean mFlag, boolean pFlag);
+
+ /**
+ * Append long(integer64) AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param vendorId vendor of Avp
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, long value, long vendorId, boolean mFlag,
boolean pFlag);
+
+ /**
+ * Append long(integer64) AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param asUnsignedInt32 true if value is unsigned integer 32 type
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, long value, boolean asUnsignedInt32);
+
+ /**
+ * Append long(integer64) AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @param asUnsignedInt32 true if value is unsigned integer 32 type
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, long value, boolean mFlag, boolean pFlag,
boolean asUnsignedInt32);
+
+ /**
+ * Append long(integer64) AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param vendorId vendor of Avp
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @param asUnsignedInt32 true if value is unsigned integer 32 type
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, long value, long vendorId, boolean mFlag,
boolean pFlag, boolean asUnsignedInt32);
+
+ /**
+ * Append float AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, float value);
+
+ /**
+ * Append float AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, float value, boolean mFlag, boolean pFlag);
+
+ /**
+ * Append float AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @param vendorId vendor of Avp
+ * @param mFlag true set M flag/false clear M flag in header Avp
+ * @param pFlag true set P flag/false clear P flag in header Avp
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, float value, long vendorId, boolean mFlag,
boolean pFlag);
+
+ /**
+ * Append double(float64) AVP
+ * @param avpCode code of Avp
+ * @param value Avp data
+ * @return Avp instance
+ */
+ Avp addAvp(int avpCode, double value);
***The diff for this file has been truncated for email.***
=======================================
---
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/Request.java
Wed Oct 15 08:14:03 2008
+++
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/Request.java
Tue Nov 2 10:02:13 2010
@@ -16,25 +16,25 @@
public interface Request extends Message {
- /**
- * @return true if it is network request
- */
- boolean isNetworkRequest();
-
- /**
- * Creates a response for this request with the specifies result code.
- * Header and system avps from request has copy to answer.
- * @param resultCode result code of answer
- * @return answer object instance
- */
- Answer createAnswer(long resultCode);
-
- /**
- * Creates a response for this request with the specifies experement
result code.
- * Header and system avps from request has copy to answer.
- * @param vendorId vendorId
- * @param experementalResultCode experement result code of answer
- * @return answer object instance
- */
- Answer createAnswer(long vendorId, long experementalResultCode);
-}
+ /**
+ * @return true if it is network request
+ */
+ boolean isNetworkRequest();
+
+ /**
+ * Creates an answer for this request with the specified result code.
+ * Header and system AVPs from request are copied to answer.
+ * @param resultCode result code of answer
+ * @return answer object instance
+ */
+ Answer createAnswer(long resultCode);
+
+ /**
+ * Creates an answer for this request with the specified experimental
result code.
+ * Header and system AVPs from request are copied to answer.
+ * @param vendorId vendorId
+ * @param experimentalResultCode experimental result code of answer
+ * @return answer object instance
+ */
+ Answer createAnswer(long vendorId, long experementalResultCode);
+}
=======================================
---
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppAnswerEvent.java
Wed Oct 15 08:14:03 2008
+++
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppAnswerEvent.java
Tue Nov 2 10:02:13 2010
@@ -11,6 +11,7 @@
import org.jdiameter.api.Avp;
import org.jdiameter.api.AvpDataException;
+import org.jdiameter.api.AvpSet;
/**
* Basic class for application specific answer event (Sx, Rx, Gx)
@@ -18,11 +19,33 @@
*/
public interface AppAnswerEvent extends AppEvent {
- /**
- * Return result code of snswer message
- * @return result code of snswer message
- * @throws AvpDataException if result code avp absent
- */
- Avp getResultCodeAvp() throws AvpDataException;
-
-}
+ /**
+ * Return result code (or experimental if present) AVP of answer message
+ * @return result code (or experimental if present) AVP of answer message
+ * @throws AvpDataException if result code avp absent
+ */
+ Avp getResultCodeAvp() throws AvpDataException;
+
+ /**
+ * Return result code value of answer message
+ * @return result code of answer message
+ * @throws AvpDataException if result code avp absent
+ */
+ int getResultCode() throws AvpDataException;
+
+ public void setResultCode(int code);
+
+ public boolean hasResultCode();
+
+ /**
+ * Return experimental result grouped avp of answer message
+ * @return experimental result grouped avp of answer message
+ * @throws AvpDataException if experimental result avp absent
+ */
+ public AvpSet getExperimentalResult() throws AvpDataException;
+
+ public boolean hasExperimentalResult();
+
+ public void setExperimentalResult(long vendor, int code);
+
+}
=======================================
---
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppEvent.java
Wed Oct 15 08:14:03 2008
+++
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppEvent.java
Tue Nov 2 10:02:13 2010
@@ -17,32 +17,56 @@
/**
* Basic class for application specific event (Sx, Rx, Gx)
+ *
* @version 1.5.1 Final
*/
public interface AppEvent extends Serializable {
- /**
- * @return commCode of parent message
- */
- int getCommandCode();
-
- /**
- * @return set of associated message
- * @throws InternalException signals that internal message is not set.
- */
- Message getMessage() throws InternalException;
-
- /**
- * Return origination host avp value ( null if avp is empty )
- * @return origination host avp value
- * @throws org.jdiameter.api.AvpDataException if avp is not string
- */
- String getOriginHost() throws AvpDataException;
-
- /**
- * Return origination realm avp value ( null if avp is empty )
- * @return origination realm avp value
- * @throws org.jdiameter.api.AvpDataException if avp is not string
- */
- String getOriginRealm() throws AvpDataException;
-}
+ /**
+ * @return commCode of parent message
+ */
+ public int getCommandCode();
+
+ /**
+ * @return set of associated message
+ * @throws InternalException signals that internal message is not set.
+ */
+ public Message getMessage() throws InternalException;
+
+ /**
+ * Return origination host avp value ( null if avp is empty )
+ *
+ * @return origination host avp value
+ * @throws AvpDataException if avp is not string
+ */
+ public String getOriginHost() throws AvpDataException;
+
+ public boolean hasOriginHost();
+
+ public void setOriginHost(String originHost);
+
+ /**
+ * Return origination realm avp value ( null if avp is empty )
+ *
+ * @return origination realm avp value
+ * @throws AvpDataException if avp is not string
+ */
+ public String getOriginRealm() throws AvpDataException;
+
+ public boolean hasOriginRealm();
+
+ public void setOriginRealm(String originRealm);
+
+ /**
+ * Return session id avp value ( null if avp is empty )
+ *
+ * @return session id avp value
+ * @throws AvpDataException if avp is not string
+ */
+ public String getSessionId() throws AvpDataException;
+
+ public boolean hasSessionId();
+
+ public void setSessionId(String sessionId);
+
+}
=======================================
---
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppRequestEvent.java
Wed Oct 15 08:14:03 2008
+++
/trunk/servers/diameter/core/jdiameter/api/src/main/java/org/jdiameter/api/app/AppRequestEvent.java
Tue Nov 2 10:02:13 2010
@@ -17,18 +17,28 @@
*/
public interface AppRequestEvent extends AppEvent {
- /**
- * Return destination host avp value ( null if avp is empty )
- * @return destination host name
- * @throws org.jdiameter.api.AvpDataException if avp is not string
- */
- String getDestinationHost() throws AvpDataException;
-
- /**
- * Return destionation realm avp value ( null if avp is empty )
- * @return destination realm name
- * @throws AvpDataException if avp is not string
- */
- String getDestinationRealm() throws AvpDataException;
+ /**
+ * Return destination host avp value ( null if avp is empty )
+ *
+ * @return destination host avp value
+ * @throws AvpDataException if avp is not string
+ */
+ public String getDestinationHost() throws AvpDataException;
+
+ public boolean hasDestinationHost();
+
+ public void setDestinationHost(String destinationHost);
+
+ /**
+ * Return destination realm avp value ( null if avp is empty )
+ *
+ * @return origination realm avp value
+ * @throws AvpDataException if avp is not string
+ */
+ public String getDestinationRealm() throws AvpDataException;
+
+ public boolean hasDestinationRealm();
+
+ public void setDestinationRealm(String destinationRealm);
}