PageRenderTime 47ms CodeModel.GetById 8ms RepoModel.GetById 0ms app.codeStats 0ms

/servers/jain-slee/resources/diameter-gq/events/src/main/java/net/java/slee/resource/diameter/gq/events/GqAARequest.java

http://mobicents.googlecode.com/
Java | 443 lines | 67 code | 57 blank | 319 comment | 0 complexity | 4084c37d48e0c076155dd1c03c9e3e27 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.gq.events;
  23. import net.java.slee.resource.diameter.base.events.DiameterMessage;
  24. import net.java.slee.resource.diameter.base.events.avp.DiameterIdentity;
  25. import net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp;
  26. import net.java.slee.resource.diameter.gq.events.avp.BindingInformation;
  27. import net.java.slee.resource.diameter.gq.events.avp.FlowGrouping;
  28. import net.java.slee.resource.diameter.gq.events.avp.GloballyUniqueAddress;
  29. import net.java.slee.resource.diameter.gq.events.avp.LatchingIndication;
  30. import net.java.slee.resource.diameter.gq.events.avp.MediaComponentDescription;
  31. import net.java.slee.resource.diameter.gq.events.avp.OverbookingIndicator;
  32. import net.java.slee.resource.diameter.gq.events.avp.ReservationPriority;
  33. import net.java.slee.resource.diameter.gq.events.avp.SIPForkingIndication;
  34. import net.java.slee.resource.diameter.gq.events.avp.SpecificAction;
  35. /**
  36. * <pre>
  37. * <b>7.1.1 AA-Request(AAR) command</b>
  38. * The AAR command, indicated by the Command-Code field set to 265 and the "R" bit set in the Command Flags field,
  39. * is sent by an AF to the SPDF in order to request the authorization for the bearer usage for the AF session.
  40. * Message Format:
  41. * &lt;AA-Request&gt; ::= < Diameter Header: 265, REQ, PXY >
  42. * < Session-Id >
  43. * { Auth-Application-Id }
  44. * { Origin-Host }
  45. * { Origin-Realm }
  46. * { Destination-Realm }
  47. * *[ Media-Component-Description ]
  48. * *[ Flow-Grouping ]
  49. * [ AF-Charging-Identifier ]
  50. * [ SIP-Forking-Indication ]
  51. * *[ Specific-Action ]
  52. * [ User-Name ]
  53. * [ Binding-Information ]
  54. * [ Latching-Indication ]
  55. * [ Reservation-Priority ]
  56. * [ Globally-Unique-Address ]
  57. * [ Service-Class ]
  58. * [ Authorization-Lifetime ]
  59. * *[ Proxy-Info ]
  60. * *[ Route-Record ]
  61. * [ Overbooking-Indicator ]
  62. * *[ Authorization-Package-Id ]
  63. * *[ AVP ]
  64. * </pre>
  65. *
  66. * @author <a href="mailto:webdev@web-ukraine.info"> Yulian Oifa </a>
  67. */
  68. public interface GqAARequest extends DiameterMessage {
  69. public static final int COMMAND_CODE = 265;
  70. /**
  71. * Returns the value of the Auth-Application-Id AVP, of type Unsigned32.
  72. *
  73. * @return
  74. */
  75. long getAuthApplicationId();
  76. /**
  77. * Sets the value of the Auth-Application-Id AVP, of type Unsigned32.
  78. *
  79. * @param authApplicationId
  80. * @throws IllegalStateException
  81. */
  82. void setAuthApplicationId(long authApplicationId) throws IllegalStateException;
  83. /**
  84. * Returns true if the Auth-Application-Id AVP is present in the message.
  85. *
  86. * @return
  87. */
  88. boolean hasAuthApplicationId();
  89. /**
  90. * Returns true if the User-Name AVP is present in the message.
  91. */
  92. boolean hasUserName();
  93. /**
  94. * Returns the value of the User-Name AVP, of type UTF8String.
  95. *
  96. * @return the value of the User-Name AVP or null if it has not been set on this message
  97. */
  98. String getUserName();
  99. /**
  100. * Sets the value of the User-Name AVP, of type UTF8String.
  101. *
  102. * @throws IllegalStateException
  103. * if setUserName has already been called
  104. */
  105. void setUserName(String userName);
  106. /**
  107. * Returns the set of Proxy-Info AVPs.
  108. *
  109. * @return
  110. */
  111. ProxyInfoAvp[] getProxyInfos();
  112. /**
  113. * Sets a single Proxy-Info AVP in the message, of type Grouped.
  114. *
  115. * @param proxyInfo
  116. * @throws IllegalStateException
  117. */
  118. void setProxyInfo(ProxyInfoAvp proxyInfo) throws IllegalStateException;
  119. /**
  120. * Sets the set of Proxy-Info AVPs, with all the values in the given array.
  121. *
  122. * @param proxyInfos
  123. * @throws IllegalStateException
  124. */
  125. void setProxyInfos(ProxyInfoAvp[] proxyInfos) throws IllegalStateException;
  126. /**
  127. * Returns the set of Route-Record AVPs.
  128. *
  129. * @return
  130. */
  131. DiameterIdentity[] getRouteRecords();
  132. /**
  133. * Sets a single Route-Record AVP in the message, of type DiameterIdentity.
  134. *
  135. * @param routeRecord
  136. * @throws IllegalStateException
  137. */
  138. void setRouteRecord(DiameterIdentity routeRecord) throws IllegalStateException;
  139. /**
  140. * Sets the set of Route-Record AVPs, with all the values in the given array.
  141. *
  142. * @param routeRecords
  143. * @throws IllegalStateException
  144. */
  145. void setRouteRecords(DiameterIdentity[] routeRecords) throws IllegalStateException;
  146. /**
  147. * Returns the value of the Authorization-Lifetime AVP, of type Unsigned32.
  148. *
  149. * @return
  150. */
  151. long getAuthorizationLifetime();
  152. /**
  153. * Sets the value of the Authorization-Lifetime AVP, of type Unsigned32.
  154. *
  155. * @param authApplicationId
  156. * @throws IllegalStateException
  157. */
  158. void setAuthorizationLifetime(long authorizationLifetime) throws IllegalStateException;
  159. /**
  160. * Returns true if the Authorization-Lifetime AVP is present in the message.
  161. *
  162. * @return
  163. */
  164. boolean hasAuthorizationLifetime();
  165. /**
  166. * Returns the set of Media-Component-Description AVPs.
  167. *
  168. * @return
  169. */
  170. MediaComponentDescription[] getMediaComponentDescriptions();
  171. /**
  172. * Sets a single Media-Component-Description AVP in the message, of type MediaComponentDescription.
  173. *
  174. * @param mediaComponentDescription
  175. * @throws IllegalStateException
  176. */
  177. void setMediaComponentDescription(MediaComponentDescription mediaComponentDescription) throws IllegalStateException;
  178. /**
  179. * Sets the set of Media-Component-Description AVPs, with all the values in the given array.
  180. *
  181. * @param mediaComponentDescriptions
  182. * @throws IllegalStateException
  183. */
  184. void setMediaComponentDescriptions(MediaComponentDescription[] mediaComponentDescriptions) throws IllegalStateException;
  185. /**
  186. * Returns the set of Flow-Grouping AVPs.
  187. *
  188. * @return
  189. */
  190. FlowGrouping[] getFlowGroupings();
  191. /**
  192. * Sets a single Media-Component-Description AVP in the message, of type FlowGrouping.
  193. *
  194. * @param flowGrouping
  195. * @throws IllegalStateException
  196. */
  197. void setFlowGrouping(FlowGrouping flowGrouping) throws IllegalStateException;
  198. /**
  199. * Sets the set of Media-Component-Description AVPs, with all the values in the given array.
  200. *
  201. * @param flowGroupings
  202. * @throws IllegalStateException
  203. */
  204. void setFlowGroupings(FlowGrouping[] flowGroupings) throws IllegalStateException;
  205. /**
  206. * Returns the value of the AF-Charging-Identifier AVP, of type OctetString. A return value of null implies that the AVP has not been set.
  207. */
  208. byte[] getAFChargingIdentifier();
  209. /**
  210. * Sets the value of the AF-Charging-Identifier AVP, of type OctetString.
  211. */
  212. void setAFChargingIdentifier(byte[] AFChargingIdentifier);
  213. /**
  214. * Returns true if the AF-Charging-Identifier AVP is present in the message.
  215. *
  216. * @return
  217. */
  218. boolean hasAFChargingIdentifier();
  219. /**
  220. * Returns the value of the SIP-Forking-Indication AVP, of type SIPForkingIndication. A return value of null implies that the AVP has not
  221. * been set.
  222. */
  223. SIPForkingIndication getSIPForkingIndication();
  224. /**
  225. * Sets the value of the SIP-Forking-Indication AVP, of type SIPForkingIndication.
  226. */
  227. void setSIPForkingIndication(SIPForkingIndication SIPForkingIndication);
  228. /**
  229. * Returns true if the Sip-Forking-Indication AVP is present in the message.
  230. *
  231. * @return
  232. */
  233. boolean hasSIPForkingIndication();
  234. /**
  235. * Returns the set of Specific-Action AVPs.
  236. *
  237. * @return
  238. */
  239. SpecificAction[] getSpecificActions();
  240. /**
  241. * Sets a single Specific-Action AVP in the message, of type SpecificAction.
  242. *
  243. * @param specificAction
  244. * @throws IllegalStateException
  245. */
  246. void setSpecificAction(SpecificAction specificAction) throws IllegalStateException;
  247. /**
  248. * Sets the set of Specific-Action AVPs, with all the values in the given array.
  249. *
  250. * @param specificActions
  251. * @throws IllegalStateException
  252. */
  253. void setSpecificActions(SpecificAction[] specificActions) throws IllegalStateException;
  254. /**
  255. * Returns the Binding-Information AVP.
  256. *
  257. * @return
  258. */
  259. BindingInformation getBindingInformation();
  260. /**
  261. * Sets a Binding-Information AVP in the message, of type BindingInformation.
  262. *
  263. * @param bindingInformation
  264. * @throws IllegalStateException
  265. */
  266. void setBindingInformation(BindingInformation bindingInformation) throws IllegalStateException;
  267. /**
  268. * Returns true if the Binding-Information AVP is present in the message.
  269. *
  270. * @return
  271. */
  272. boolean hasBindingInformation();
  273. /**
  274. * Returns the Latching-Information AVP.
  275. *
  276. * @return
  277. */
  278. LatchingIndication getLatchingIndication();
  279. /**
  280. * Sets a Latching-Indication AVP in the message, of type BindingInformation.
  281. *
  282. * @param latchingIndication
  283. * @throws IllegalStateException
  284. */
  285. void setLatchingIndication(LatchingIndication latchingIndication) throws IllegalStateException;
  286. /**
  287. * Returns true if the Latching-Indication AVP is present in the message.
  288. *
  289. * @return
  290. */
  291. boolean hasLatchingIndication();
  292. /**
  293. * Returns the Reservation-Priority AVP.
  294. *
  295. * @return
  296. */
  297. ReservationPriority getReservationPriority();
  298. /**
  299. * Sets a Reservation-Priority AVP in the message, of type ReservationPriority.
  300. *
  301. * @param reservationPriority
  302. * @throws IllegalStateException
  303. */
  304. void setReservationPriority(ReservationPriority reservationPriority) throws IllegalStateException;
  305. /**
  306. * Returns true if the Reservation-Priority AVP is present in the message.
  307. *
  308. * @return
  309. */
  310. boolean hasReservationPriority();
  311. /**
  312. * Returns the Globally-Unique-Address AVP.
  313. *
  314. * @return
  315. */
  316. GloballyUniqueAddress getGloballyUniqueAddress();
  317. /**
  318. * Sets a Globally-Unique-Address AVP in the message, of type GloballyUniqueAddress.
  319. *
  320. * @param globallyUniqueAddress
  321. * @throws IllegalStateException
  322. */
  323. void setGloballyUniqueAddress(GloballyUniqueAddress globallyUniqueAddress) throws IllegalStateException;
  324. /**
  325. * Returns true if the Globally-Unique-Address AVP is present in the message.
  326. *
  327. * @return
  328. */
  329. boolean hasGloballyUniqueAddress();
  330. /**
  331. * Returns true if the Service-Class AVP is present in the message.
  332. */
  333. boolean hasServiceClass();
  334. /**
  335. * Returns the value of the Service-Class AVP, of type UTF8String.
  336. *
  337. * @return the value of the Service-Class AVP or null if it has not been set on this message
  338. */
  339. String getServiceClass();
  340. /**
  341. * Sets the value of the Service-Class AVP, of type UTF8String.
  342. *
  343. * @throws IllegalStateException
  344. * if setServiceClass has already been called
  345. */
  346. void setServiceClass(String serviceClass);
  347. /**
  348. * Returns the Overbooking-Indicator AVP.
  349. *
  350. * @return
  351. */
  352. OverbookingIndicator getOverbookingIndicator();
  353. /**
  354. * Sets a Overbooking-Indicator AVP in the message, of type OverbookingIndicator.
  355. *
  356. * @param overbookingIndicator
  357. * @throws IllegalStateException
  358. */
  359. void setOverbookingIndicator(OverbookingIndicator overbookingIndicator) throws IllegalStateException;
  360. /**
  361. * Returns true if the Overbooking-Indicator AVP is present in the message.
  362. *
  363. * @return
  364. */
  365. boolean hasOverbookingIndicator();
  366. /**
  367. * Returns the set of Authorization-Package-Id AVPs.
  368. *
  369. * @return
  370. */
  371. String[] getAuthorizationPackageIds();
  372. /**
  373. * Sets a single Authorization-Package-Id AVP in the message, of type UTF8String.
  374. *
  375. * @param specificAction
  376. * @throws IllegalStateException
  377. */
  378. void setAuthorizationPackageId(String authorizationPackageId) throws IllegalStateException;
  379. /**
  380. * Sets the set of Authorization-Package-Id AVPs, with all the values in the given array.
  381. *
  382. * @param specificActions
  383. * @throws IllegalStateException
  384. */
  385. void setAuthorizationPackageIds(String[] authorizationPackageIds) throws IllegalStateException;
  386. }