PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/servers/jain-slee/resources/diameter-ro/events/src/main/java/net/java/slee/resource/diameter/ro/events/avp/TriggerType.java

http://mobicents.googlecode.com/
Java | 336 lines | 128 code | 106 blank | 102 comment | 0 complexity | 65c0890aee36d8d6e9a61e2cac242193 MD5 | raw file
Possible License(s): LGPL-3.0, GPL-3.0, LGPL-2.1, GPL-2.0, CC-BY-SA-3.0, CC0-1.0, Apache-2.0, BSD-3-Clause
  1. /*
  2. * JBoss, Home of Professional Open Source
  3. * Copyright 2011, Red Hat, Inc. and individual contributors
  4. * by the @authors tag. See the copyright.txt in the distribution for a
  5. * full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 2.1 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. package net.java.slee.resource.diameter.ro.events.avp;
  23. import java.io.Serializable;
  24. import java.io.StreamCorruptedException;
  25. import net.java.slee.resource.diameter.base.events.avp.Enumerated;
  26. /**
  27. * Java class to represent the TriggerType enumerated type.
  28. *
  29. * @author <a href="mailto:brainslog@gmail.com"> Alexandre Mendonca </a>
  30. * @author <a href="mailto:baranowb@gmail.com"> Bartosz Baranowski </a>
  31. */
  32. public class TriggerType implements Enumerated, Serializable {
  33. private static final long serialVersionUID = 1L;
  34. public static final int _CHANGE_IN_LOCATION = 3;
  35. public static final int _CHANGE_IN_QOS = 2;
  36. public static final int _CHANGE_IN_RAT = 4;
  37. public static final int _CHANGE_IN_SGSN_IP_ADDRESS = 1;
  38. public static final int _CHANGEINLOCATION_CellId = 34;
  39. public static final int _CHANGEINLOCATION_LAC = 33;
  40. public static final int _CHANGEINLOCATION_MCC = 30;
  41. public static final int _CHANGEINLOCATION_MNC = 31;
  42. public static final int _CHANGEINLOCATION_RAC = 32;
  43. public static final int _CHANGEINPARTICIPANTS_Number = 50;
  44. public static final int _CHANGEINQOS_DELAY_CLASS = 12;
  45. public static final int _CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_DOWNLINK = 23;
  46. public static final int _CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_UPLINK = 22;
  47. public static final int _CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_DOWNLINK = 17;
  48. public static final int _CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_UPLINK = 16;
  49. public static final int _CHANGEINQOS_MEAN_THROUGHPUT = 15;
  50. public static final int _CHANGEINQOS_PEAK_THROUGHPUT = 13;
  51. public static final int _CHANGEINQOS_PRECEDENCE_CLASS = 14;
  52. public static final int _CHANGEINQOS_RELIABILITY_CLASS = 11;
  53. public static final int _CHANGEINQOS_RESIDUAL_BER = 18;
  54. public static final int _CHANGEINQOS_SDU_ERROR_RATIO = 19;
  55. public static final int _CHANGEINQOS_TRAFFIC_CLASS = 10;
  56. public static final int _CHANGEINQOS_TRAFFIC_HANDLING_PRIORITY = 21;
  57. public static final int _CHANGEINQOS_TRANSFER_DELAY = 20;
  58. /**
  59. * This value is used to indicate that a change in the end user location shall cause the credit control client to ask for a re- authorisation of the associated quota. This should not be used in conjunction with enumerated values 30 to 34.
  60. */
  61. public static final TriggerType CHANGE_IN_LOCATION = new TriggerType(_CHANGE_IN_LOCATION);
  62. /**
  63. * This value is used to indicate that a change in the end user negotiated QoS shall cause the credit control client to ask for a re- authorisation of the associated quota. This should not be used in conjunction with enumerated values 10 to 23.
  64. */
  65. public static final TriggerType CHANGE_IN_QOS = new TriggerType(_CHANGE_IN_QOS);
  66. /**
  67. * This value is used to indicate that a change in the radio access technology shall cause the credit control client to ask for a re- authorisation of the associated quota.
  68. */
  69. public static final TriggerType CHANGE_IN_RAT = new TriggerType(_CHANGE_IN_RAT);
  70. /**
  71. * This value is used to indicate that a change in the SGSN IP address shall cause the credit control client to ask for a re-authorisation of the associated quota.
  72. */
  73. public static final TriggerType CHANGE_IN_SGSN_IP_ADDRESS = new TriggerType(_CHANGE_IN_SGSN_IP_ADDRESS);
  74. /**
  75. * This value is used to indicate that a change in the Cell Identity where the end user is located shall cause the credit control client to ask for a re-authorisation of the associated quota.
  76. */
  77. public static final TriggerType CHANGEINLOCATION_CellId = new TriggerType(_CHANGEINLOCATION_CellId);
  78. /**
  79. * This value is used to indicate that a change in the LAC where the end user is located shall cause the credit control client to ask for a re-authorisation of the associated quota.
  80. */
  81. public static final TriggerType CHANGEINLOCATION_LAC = new TriggerType(_CHANGEINLOCATION_LAC);
  82. /**
  83. * This value is used to indicate that a change in the MCC of the serving network shall cause the credit control client to ask for a re-authorisation of the associated quota.
  84. */
  85. public static final TriggerType CHANGEINLOCATION_MCC = new TriggerType(_CHANGEINLOCATION_MCC);
  86. /**
  87. * This value is used to indicate that a change in the MNC of the serving network shall cause the credit control client to ask for a re-authorisation of the associated quota.
  88. */
  89. public static final TriggerType CHANGEINLOCATION_MNC = new TriggerType(_CHANGEINLOCATION_MNC);
  90. /**
  91. * This value is used to indicate that a change in the RAC where the end user is located shall cause the credit control client to ask for a re-authorisation of the associated quota.
  92. */
  93. public static final TriggerType CHANGEINLOCATION_RAC = new TriggerType(_CHANGEINLOCATION_RAC);
  94. /**
  95. * This value is used specifically for PoC to indicate that a change in the number of active participants within a PoC session shall cause the credit control client to ask for a re-authorisation of the associated quota.
  96. */
  97. public static final TriggerType CHANGEINPARTICIPANTS_Number = new TriggerType(_CHANGEINPARTICIPANTS_Number);
  98. /**
  99. * This value is used to indicate that a change in the end user negotiated delay class shall cause the credit control client to ask for a re-authorisation of the associated quota.
  100. */
  101. public static final TriggerType CHANGEINQOS_DELAY_CLASS = new TriggerType(_CHANGEINQOS_DELAY_CLASS);
  102. /**
  103. * This value is used to indicate that a change in the end user negotiated downlink guaranteed bit rate shall cause the credit control client to ask for a re-authorisation of the associated quota.
  104. */
  105. public static final TriggerType CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_DOWNLINK = new TriggerType(_CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_DOWNLINK);
  106. /**
  107. * This value is used to indicate that a change in the end user negotiated uplink guaranteed bit rate shall cause the credit control client to ask for a re-authorisation of the associated quota.
  108. */
  109. public static final TriggerType CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_UPLINK = new TriggerType(_CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_UPLINK);
  110. /**
  111. * This value is used to indicate that a change in the end user negotiated downlink maximum bit rate shall cause the credit control client to ask for a re-authorisation of the associated quota.
  112. */
  113. public static final TriggerType CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_DOWNLINK = new TriggerType(_CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_DOWNLINK);
  114. /**
  115. * This value is used to indicate that a change in the end user negotiated uplink maximum bit rate shall cause the credit control client to ask for a re-authorisation of the associated quota.
  116. */
  117. public static final TriggerType CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_UPLINK = new TriggerType(_CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_UPLINK);
  118. /**
  119. * This value is used to indicate that a change in the end user negotiated mean throughput shall cause the credit control client to ask for a re-authorisation of the associated quota.
  120. */
  121. public static final TriggerType CHANGEINQOS_MEAN_THROUGHPUT = new TriggerType(_CHANGEINQOS_MEAN_THROUGHPUT);
  122. /**
  123. * This value is used to indicate that a change in the end user negotiated peak throughput shall cause the credit control client to ask for a re-authorisation of the associated quota.
  124. */
  125. public static final TriggerType CHANGEINQOS_PEAK_THROUGHPUT = new TriggerType(_CHANGEINQOS_PEAK_THROUGHPUT);
  126. /**
  127. * This value is used to indicate that a change in the end user negotiated precedence class shall cause the credit control client to ask for a re-authorisation of the associated quota.
  128. */
  129. public static final TriggerType CHANGEINQOS_PRECEDENCE_CLASS = new TriggerType(_CHANGEINQOS_PRECEDENCE_CLASS);
  130. /**
  131. * This value is used to indicate that a change in the end user negotiated reliability class shall cause the credit control client to ask for a re-authorisation of the associated quota.
  132. */
  133. public static final TriggerType CHANGEINQOS_RELIABILITY_CLASS = new TriggerType(_CHANGEINQOS_RELIABILITY_CLASS);
  134. /**
  135. * This value is used to indicate that a change in the end user negotiated residual BER shall cause the credit control client to ask for a re-authorisation of the associated quota.
  136. */
  137. public static final TriggerType CHANGEINQOS_RESIDUAL_BER = new TriggerType(_CHANGEINQOS_RESIDUAL_BER);
  138. /**
  139. * This value is used to indicate that a change in the end user negotiated SDU error ratio shall cause the credit control client to ask for a re-authorisation of the associated quota.
  140. */
  141. public static final TriggerType CHANGEINQOS_SDU_ERROR_RATIO = new TriggerType(_CHANGEINQOS_SDU_ERROR_RATIO);
  142. /**
  143. * This value is used to indicate that a change in the end user negotiated traffic class shall cause the credit control client to ask for a re-authorisation of the associated quota.
  144. */
  145. public static final TriggerType CHANGEINQOS_TRAFFIC_CLASS = new TriggerType(_CHANGEINQOS_TRAFFIC_CLASS);
  146. /**
  147. * This value is used to indicate that a change in the end user negotiated traffic handling priority shall cause the credit control client to ask for a re-authorisation of the associated quota.
  148. */
  149. public static final TriggerType CHANGEINQOS_TRAFFIC_HANDLING_PRIORITY = new TriggerType(_CHANGEINQOS_TRAFFIC_HANDLING_PRIORITY);
  150. /**
  151. * This value is used to indicate that a change in the end user negotiated transfer delay shall cause the credit control client to ask for a re-authorisation of the associated quota.
  152. */
  153. public static final TriggerType CHANGEINQOS_TRANSFER_DELAY = new TriggerType(_CHANGEINQOS_TRANSFER_DELAY);
  154. private TriggerType(int v) {
  155. value = v;
  156. }
  157. /**
  158. * Return the value of this instance of this enumerated type.
  159. */
  160. public static TriggerType fromInt(int type) {
  161. switch(type) {
  162. case _CHANGE_IN_LOCATION: return CHANGE_IN_LOCATION;
  163. case _CHANGE_IN_QOS: return CHANGE_IN_QOS;
  164. case _CHANGE_IN_RAT: return CHANGE_IN_RAT;
  165. case _CHANGE_IN_SGSN_IP_ADDRESS: return CHANGE_IN_SGSN_IP_ADDRESS;
  166. case _CHANGEINLOCATION_CellId: return CHANGEINLOCATION_CellId;
  167. case _CHANGEINLOCATION_LAC: return CHANGEINLOCATION_LAC;
  168. case _CHANGEINLOCATION_MCC: return CHANGEINLOCATION_MCC;
  169. case _CHANGEINLOCATION_MNC: return CHANGEINLOCATION_MNC;
  170. case _CHANGEINLOCATION_RAC: return CHANGEINLOCATION_RAC;
  171. case _CHANGEINPARTICIPANTS_Number: return CHANGEINPARTICIPANTS_Number;
  172. case _CHANGEINQOS_DELAY_CLASS: return CHANGEINQOS_DELAY_CLASS;
  173. case _CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_DOWNLINK: return CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_DOWNLINK;
  174. case _CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_UPLINK: return CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_UPLINK;
  175. case _CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_DOWNLINK: return CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_DOWNLINK;
  176. case _CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_UPLINK: return CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_UPLINK;
  177. case _CHANGEINQOS_MEAN_THROUGHPUT: return CHANGEINQOS_MEAN_THROUGHPUT;
  178. case _CHANGEINQOS_PEAK_THROUGHPUT: return CHANGEINQOS_PEAK_THROUGHPUT;
  179. case _CHANGEINQOS_PRECEDENCE_CLASS: return CHANGEINQOS_PRECEDENCE_CLASS;
  180. case _CHANGEINQOS_RELIABILITY_CLASS: return CHANGEINQOS_RELIABILITY_CLASS;
  181. case _CHANGEINQOS_RESIDUAL_BER: return CHANGEINQOS_RESIDUAL_BER;
  182. case _CHANGEINQOS_SDU_ERROR_RATIO: return CHANGEINQOS_SDU_ERROR_RATIO;
  183. case _CHANGEINQOS_TRAFFIC_CLASS: return CHANGEINQOS_TRAFFIC_CLASS;
  184. case _CHANGEINQOS_TRAFFIC_HANDLING_PRIORITY: return CHANGEINQOS_TRAFFIC_HANDLING_PRIORITY;
  185. case _CHANGEINQOS_TRANSFER_DELAY: return CHANGEINQOS_TRANSFER_DELAY;
  186. default: throw new IllegalArgumentException("Invalid TriggerType value: " + type);
  187. }
  188. }
  189. public int getValue() {
  190. return value;
  191. }
  192. public String toString() {
  193. switch(value) {
  194. case _CHANGE_IN_LOCATION: return "CHANGE_IN_LOCATION";
  195. case _CHANGE_IN_QOS: return "CHANGE_IN_QOS";
  196. case _CHANGE_IN_RAT: return "CHANGE_IN_RAT";
  197. case _CHANGE_IN_SGSN_IP_ADDRESS: return "CHANGE_IN_SGSN_IP_ADDRESS";
  198. case _CHANGEINLOCATION_CellId: return "CHANGEINLOCATION_CellId";
  199. case _CHANGEINLOCATION_LAC: return "CHANGEINLOCATION_LAC";
  200. case _CHANGEINLOCATION_MCC: return "CHANGEINLOCATION_MCC";
  201. case _CHANGEINLOCATION_MNC: return "CHANGEINLOCATION_MNC";
  202. case _CHANGEINLOCATION_RAC: return "CHANGEINLOCATION_RAC";
  203. case _CHANGEINPARTICIPANTS_Number: return "CHANGEINPARTICIPANTS_Number";
  204. case _CHANGEINQOS_DELAY_CLASS: return "CHANGEINQOS_DELAY_CLASS";
  205. case _CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_DOWNLINK: return "CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_DOWNLINK";
  206. case _CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_UPLINK: return "CHANGEINQOS_GUARANTEED_BIT_RATE_FOR_UPLINK";
  207. case _CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_DOWNLINK: return "CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_DOWNLINK";
  208. case _CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_UPLINK: return "CHANGEINQOS_MAXIMUM_BIT_RATE_FOR_UPLINK";
  209. case _CHANGEINQOS_MEAN_THROUGHPUT: return "CHANGEINQOS_MEAN_THROUGHPUT";
  210. case _CHANGEINQOS_PEAK_THROUGHPUT: return "CHANGEINQOS_PEAK_THROUGHPUT";
  211. case _CHANGEINQOS_PRECEDENCE_CLASS: return "CHANGEINQOS_PRECEDENCE_CLASS";
  212. case _CHANGEINQOS_RELIABILITY_CLASS: return "CHANGEINQOS_RELIABILITY_CLASS";
  213. case _CHANGEINQOS_RESIDUAL_BER: return "CHANGEINQOS_RESIDUAL_BER";
  214. case _CHANGEINQOS_SDU_ERROR_RATIO: return "CHANGEINQOS_SDU_ERROR_RATIO";
  215. case _CHANGEINQOS_TRAFFIC_CLASS: return "CHANGEINQOS_TRAFFIC_CLASS";
  216. case _CHANGEINQOS_TRAFFIC_HANDLING_PRIORITY: return "CHANGEINQOS_TRAFFIC_HANDLING_PRIORITY";
  217. case _CHANGEINQOS_TRANSFER_DELAY: return "CHANGEINQOS_TRANSFER_DELAY";
  218. default: return "<Invalid Value>";
  219. }
  220. }
  221. private Object readResolve() throws StreamCorruptedException {
  222. try {
  223. return fromInt(value);
  224. }
  225. catch (IllegalArgumentException iae) {
  226. throw new StreamCorruptedException("Invalid internal state found: " + value);
  227. }
  228. }
  229. private int value = 0;
  230. }