PageRenderTime 50ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/servers/jain-slee/resources/diameter-rx/events/src/main/java/net/java/slee/resource/diameter/rx/events/AARequest.java

http://mobicents.googlecode.com/
Java | 473 lines | 61 code | 55 blank | 357 comment | 0 complexity | 22f457dde607cdffe067249eb597fd41 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.rx.events;
  23. import net.java.slee.resource.diameter.cca.events.avp.SubscriptionIdAvp;
  24. import net.java.slee.resource.diameter.rx.events.avp.MediaComponentDescriptionAvp;
  25. import net.java.slee.resource.diameter.rx.events.avp.ReservationPriority;
  26. import net.java.slee.resource.diameter.rx.events.avp.SIPForkingIndication;
  27. import net.java.slee.resource.diameter.rx.events.avp.ServiceInfoStatus;
  28. import net.java.slee.resource.diameter.rx.events.avp.SpecificAction;
  29. import net.java.slee.resource.diameter.rx.events.avp.SponsoredConnectivityDataAvp;
  30. /**
  31. * The AAR command, indicated by the Command-Code field set to 265 and the 'R'
  32. * bit set in the Command Flags field, is sent by an AF to the PCRF in order
  33. * to provide it with the Session Information.
  34. *
  35. * <pre>
  36. * < AA-Request> ::= < Diameter Header: 265, REQ, PXY >
  37. * < Session-Id >
  38. * { Auth-Application-Id }
  39. * { Origin-Host }
  40. * { Origin-Realm }
  41. * { Destination-Realm }
  42. * [ Destination-Host ]
  43. * [ AF-Application-Identifier ]
  44. * *[ Media-Component-Description ]
  45. * [ Service-Info-Status ]
  46. * [ AF-Charging-Identifier ]
  47. * [ SIP-Forking-Indication ]
  48. * *[ Specific-Action ]
  49. * *[ Subscription-ID ]
  50. * *[ Supported-Features ]
  51. * [ Reservation-Priority ]
  52. * [ Framed-IP-Address ]
  53. * [ Framed-IPv6-Prefix ]
  54. * [ Called-Station-ID ]
  55. * [ Service-URN ]
  56. * [ Sponsored-Connectivity-Data ]
  57. * [ MPS-Identifier ]
  58. * [ Rx-Request-Type ]
  59. * [ Origin-State-Id ]
  60. * *[ Proxy-Info ]
  61. * *[ Route-Record ]
  62. * *[ AVP ]
  63. * </pre>
  64. *
  65. * @author <a href="mailto:brainslog@gmail.com"> Alexandre Mendonca </a>
  66. * @author <a href="mailto:baranowb@gmail.com"> Bartosz Baranowski </a>
  67. * @author <a href="mailto:richard.good@smilecoms.com"> Richard Good </a>
  68. */
  69. public interface AARequest extends AAMessage {
  70. static final int commandCode = 265;
  71. /**
  72. * The AF-Application-identifier AVP (AVP code 504) is of type OctetString,
  73. * and it contains information that identifies the particular service that
  74. * the AF service session belongs to. This information may be used by the
  75. * PCRF to differentiate QoS for different application services. For example
  76. * the AF-Application-Identifier may be used as additional information
  77. * together with the Media-Type AVP when the QoS class for the bearer
  78. * authorization at the Gx interface is selected. The
  79. * AF-Application-Identifier may be used also to complete the QoS
  80. * authorization with application specific default settings in the PCRF if
  81. * the AF does not provide full Session-Component-Description information.
  82. *
  83. * @param afAppId
  84. */
  85. public void setAFApplicationIdentifier(byte[] afAppId);
  86. /**
  87. * Check if AF-Application-identifier AVP (AVP code 504) is present in
  88. * message. Returns true in case it is.
  89. *
  90. * @return
  91. */
  92. public boolean hasAFApplicationIdentifier();
  93. /**
  94. * Retrieves possible value of AF-Application-identifier AVP (AVP code 504)
  95. * from message
  96. *
  97. * @return
  98. */
  99. public byte[] getAFApplicationIdentifier();
  100. /**
  101. * Check if Media-Component-Description AVP (AVP code 517) is present in
  102. * message. Returns true in case it is.
  103. *
  104. * @return
  105. */
  106. public boolean hasMediaComponentDescription();
  107. /**
  108. * The Media-Component-Description AVP (AVP code 517) is of type Grouped,
  109. * and it contains service information for a single media component within
  110. * an AF session or the AF signalling information. The service information
  111. * may be based on the SDI exchanged between the AF and the AF session
  112. * client in the UE. The information may be used by the PCRF to determine
  113. * authorized QoS and IP flow classifiers for bearer authorization and PCC
  114. * rule selection.
  115. *
  116. * @param mcd
  117. */
  118. public void setMediaComponentDescription(MediaComponentDescriptionAvp mcd);
  119. public void setMediaComponentDescriptions(MediaComponentDescriptionAvp[] mcds);
  120. public MediaComponentDescriptionAvp[] getMediaComponentDescriptions();
  121. /**
  122. * The Service-Info-Status AVP (AVP code 527) is of type Enumerated, and
  123. * indicates the status of the service information that the AF is providing
  124. * to the PCRF.
  125. *
  126. * @return
  127. */
  128. public ServiceInfoStatus getServiceInfoStatus();
  129. /**
  130. * Sets value of Service-Info-Status AVP (AVP code 527)
  131. *
  132. * @param serviceInfoStatus
  133. */
  134. public void setServiceInfoStatus(ServiceInfoStatus serviceInfoStatus);
  135. /**
  136. * Check if Service-Info-Status AVP (AVP code 527) is present in message.
  137. * Returns true in case it is.
  138. *
  139. * @return
  140. */
  141. public boolean hasServiceInfoStatus();
  142. /**
  143. * The AF-Charging-Identifier AVP (AVP code 505) is of type OctetString,
  144. * contains the AF Charging Identifier that is sent by the AF. This
  145. * information may be used for charging correlation with bearer layer.
  146. *
  147. * @param afAppId
  148. */
  149. public void setAFChargingIdentifier(byte[] afAppId);
  150. /**
  151. * Check if AF-Charging-Identifier AVP (AVP code 505) is present in message.
  152. * Returns true in case it is.
  153. *
  154. * @return
  155. */
  156. public boolean hasAFChargingIdentifier();
  157. /**
  158. * Retrieves possible value of AF-Charging-Identifier AVP (AVP code 505)
  159. * from message
  160. *
  161. * @return
  162. */
  163. public byte[] getAFChargingIdentifier();
  164. /**
  165. * Checks if the SIP-Forking-Indication AVP (AVP code 523) is present in
  166. * message, returns true in case it is.
  167. *
  168. * @return
  169. */
  170. public boolean hasSIPForkingIndication();
  171. /**
  172. * Sets value of the SIP-Forking-Indication AVP (AVP code 523),of type
  173. * Enumerated, and describes if several SIP dialogues are related to one
  174. * Diameter session
  175. *
  176. * @param sipForkingIndication
  177. */
  178. public void setSIPForkingIndication(SIPForkingIndication sipForkingIndication);
  179. /**
  180. * Retrieves value of the SIP-Forking-Indication AVP (AVP code 523).
  181. *
  182. * @return
  183. */
  184. public SIPForkingIndication getSIPForkingIndication();
  185. /**
  186. * Checks if the Specific-Action AVP (AVP code 513) is present in the
  187. * message.
  188. *
  189. * @return
  190. */
  191. public boolean hasSpecificAction();
  192. /**
  193. * Sets value of the Specific-Action AVP (AVP code 513),of type Enumerated.
  194. * Within a PCRF initiated Re-Authorization Request, the Specific-Action AVP
  195. * determines the type of the action. Within an initial AA request the AF
  196. * may use the Specific-Action AVP to request specific actions from the
  197. * server at the bearer events and to limit the contact to such bearer
  198. * events where specific action is required. If the Specific-Action AVP is
  199. * omitted within the initial AA request, no notification of any of the
  200. * events defined below is requested.
  201. *
  202. * @param specificAction
  203. */
  204. public void setSpecificAction(SpecificAction specificAction);
  205. public void setSpecificActions(SpecificAction[] specificAction);
  206. /**
  207. * Retrieves value of the Specific-Action AVP (AVP code 513).
  208. *
  209. * @return
  210. */
  211. public SpecificAction[] getSpecificActions();
  212. /**
  213. * Checks if the Subscription-Id AVP (AVP Code 443) is present in the
  214. * message. In case it is, it returns true;
  215. *
  216. * @return
  217. */
  218. public boolean hasSubscriptionId();
  219. public void setSubscriptionId(SubscriptionIdAvp subscriptionId);
  220. /**
  221. * Sets value of the Subscription-Id AVP (AVP Code 443). It is used to
  222. * identify the end user's subscription and is of type Grouped.
  223. *
  224. * @param subscriptionIds
  225. */
  226. public void setSubscriptionIds(SubscriptionIdAvp[] subscriptionIds);
  227. /**
  228. * Retrieves value of the Subscription-Id AVP (AVP Code 443).
  229. *
  230. * @return
  231. */
  232. public SubscriptionIdAvp[] getSubscriptionIds();
  233. /**
  234. * Returns the Reservation-Priority AVP.
  235. *
  236. * @return
  237. */
  238. public ReservationPriority getReservationPriority();
  239. /**
  240. * Sets a Reservation-Priority AVP in the message, of type
  241. * ReservationPriority.
  242. *
  243. * @param reservationPriority
  244. * @throws IllegalStateException
  245. */
  246. public void setReservationPriority(ReservationPriority reservationPriority) throws IllegalStateException;
  247. /**
  248. * Returns true if the Reservation-Priority AVP is present in the message.
  249. *
  250. * @return
  251. */
  252. public boolean hasReservationPriority();
  253. /**
  254. * Fetches the Framed-IP-Address AVP (AVP Code 8) [RADIUS], of type
  255. * OctetString
  256. *
  257. * @return
  258. */
  259. public byte[] getFramedIPAddress();
  260. /**
  261. * Checks if the Framed-IP-Address AVP (AVP Code 8) is present in message.
  262. * In case it is, this method returns true.
  263. *
  264. * @return
  265. */
  266. public boolean hasFramedIPAddress();
  267. /**
  268. * Sets value of the Framed-IP-Address AVP (AVP Code 8).
  269. *
  270. * @param framedIpAddress
  271. */
  272. public void setFramedIPAddress(byte[] framedIpAddress);
  273. /**
  274. * Fetches the Framed-IP-V6Prefix AVP (AVP Code 97) [RADIUS], of type
  275. * OctetString
  276. *
  277. * @return
  278. */
  279. public byte[] getFramedIPV6Prefix();
  280. /**
  281. * Checks if the Framed-IP-V6Prefix AVP (AVP Code 97) is present in message.
  282. * In case it is, this method returns true.
  283. *
  284. * @return
  285. */
  286. public boolean hasFramedIPV6Prefix();
  287. /**
  288. * Sets value of the Framed-IP-V6Prefix AVP (AVP Code 97).
  289. *
  290. * @param framedIpV6Prefix
  291. */
  292. public void setFramedIPV6Prefix(byte[] framedIpV6Prefix);
  293. /**
  294. * Checks if the Called-Station-Id AVP (AVP Code 30) is present in message.
  295. * In case it is, method returns true.
  296. *
  297. * @return
  298. */
  299. public boolean hasCalledStationId();
  300. /**
  301. * Fetches value of the Called-Station-Id AVP (AVP Code 30), of type
  302. * UTF8String. It allows the NAS to send the ASCII string describing the
  303. * layer 2 address the user contacted in the request. For dialup access,
  304. * this can be a phone number obtained by using Dialed Number Identification
  305. * (DNIS) or a similar technology. Note that this may be different from the
  306. * phone number the call comes in on. For use with IEEE 802 access, the
  307. * Called-Station-Id MAY contain a MAC address formatted as described in
  308. * [RAD802.1X]. It SHOULD only be present in authentication and/or
  309. * authorization requests.
  310. *
  311. * If the Auth-Request-Type AVP is set to authorization-only and the
  312. * User-Name AVP is absent, the Diameter Server MAY perform authorization
  313. * based on this field. This can be used by a NAS to request whether a call
  314. * should be answered based on the DNIS.
  315. *
  316. * The codification of this field's allowed usage range is outside the scope
  317. * of this specification.
  318. *
  319. * @return
  320. */
  321. public String getCalledStationId();
  322. /**
  323. * Sets value of the Called-Station-Id AVP (AVP Code 30).
  324. *
  325. * @param calledStationId
  326. */
  327. public void setCalledStationId(String calledStationId);
  328. /**
  329. * Checks if the Service-URN AVP (AVP code 525) is present in message. In
  330. * case it is, method returns true.
  331. *
  332. * @return
  333. */
  334. public boolean hasServiceURN();
  335. /**
  336. * Sets value of the Service-URN AVP (AVP code 525), of type OctetString. It
  337. * indicates that an AF session is used for emergency traffic.
  338. *
  339. * @param serviceURN
  340. */
  341. public void setServiceURN(byte[] serviceURN);
  342. /**
  343. * Fetches value of the Service-URN AVP (AVP code 525).
  344. *
  345. * @return
  346. */
  347. public byte[] getServiceURN();
  348. /**
  349. * Checks if the Sponsored-Connectivity-Data AVP (AVP code 530) is present
  350. * in message. In case it is, method returns true.
  351. *
  352. * @return
  353. */
  354. public boolean hasSponsoredConnectivityData();
  355. /**
  356. * Sets value of the Sponsored-Connectivity-Data AVP (AVP code 530), of type
  357. * Grouped
  358. *
  359. * @param scd
  360. */
  361. public void setSponsoredConnectivityData(SponsoredConnectivityDataAvp scd);
  362. /**
  363. * Fetches value of the Sponsored-Connectivity-Data AVP (AVP code 530), of
  364. * type Grouped
  365. *
  366. * @return
  367. */
  368. public SponsoredConnectivityDataAvp getSponsoredConnectivityData();
  369. /**
  370. * Checks if the MPS-Identifier AVP (AVP code 528) is present in message,
  371. * in case it is, method returns true.
  372. *
  373. * @return
  374. */
  375. public boolean hasMPSIdentifier();
  376. /**
  377. * Sets value of the MPS-Identifier AVP (AVP code 528),of type OctetString.
  378. * It indicates that an AF session relates to an MPS session. It contains
  379. * the national variant for MPS service name (e.g., NGN GETS).
  380. *
  381. * @param mpsIdentifier
  382. */
  383. public void setMPSIdentifier(byte[] mpsIdentifier);
  384. /**
  385. * Fetches value of the MPS-Identifier AVP (AVP code 528).
  386. *
  387. * @return
  388. */
  389. public byte[] getMPSIdentifier();
  390. /**
  391. * Returns true if the Origin-State-Id AVP is present in the message.
  392. */
  393. public boolean hasOriginStateId();
  394. /**
  395. * Returns the value of the Origin-State-Id AVP, of type Unsigned32. Use
  396. * {@link #hasOriginStateId()} to check the existence of this AVP.
  397. *
  398. * @return the value of the Origin-State-Id AVP
  399. * @throws IllegalStateException
  400. * if the Origin-State-Id AVP has not been set on this message
  401. */
  402. public long getOriginStateId();
  403. /**
  404. * Sets the value of the Origin-State-Id AVP, of type Unsigned32.
  405. *
  406. * @throws IllegalStateException
  407. * if setOriginStateId has already been called
  408. */
  409. public void setOriginStateId(long originStateId);
  410. /**
  411. * Returns true if the Proxy-Info AVP is present in the message.
  412. */
  413. public boolean hasProxyInfo();
  414. /**
  415. * Returns true if the Route-Record AVP is present in the message.
  416. */
  417. public boolean hasRouteRecord();
  418. }