PageRenderTime 62ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/servers/jain-slee/resources/diameter-cx-dx/events/src/main/java/net/java/slee/resource/diameter/cxdx/events/UserAuthorizationRequest.java

http://mobicents.googlecode.com/
Java | 286 lines | 41 code | 34 blank | 211 comment | 0 complexity | e57f2a324512307dd719d0241efdd8ff 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.cxdx.events;
  23. import net.java.slee.resource.diameter.base.events.DiameterMessage;
  24. import net.java.slee.resource.diameter.base.events.avp.AuthSessionStateType;
  25. import net.java.slee.resource.diameter.base.events.avp.DiameterIdentity;
  26. import net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp;
  27. import net.java.slee.resource.diameter.base.events.avp.VendorSpecificApplicationIdAvp;
  28. import net.java.slee.resource.diameter.cxdx.events.avp.UserAuthorizationType;
  29. import net.java.slee.resource.diameter.cxdx.events.avp.SupportedFeaturesAvp;
  30. /**
  31. * <pre>
  32. * <b>6.1.1 User-Authorization-Request (UAR) Command</b>
  33. * The User-Authorization-Request (UAR) command, indicated by the Command-Code field set to 300
  34. * and the ???R??? bit set in the Command Flags field, is sent by a Diameter Multimedia client to a
  35. * Diameter Multimedia server in order to request the authorization of the registration of a
  36. * multimedia user.
  37. *
  38. * Message Format
  39. * < User-Authorization-Request> ::= < Diameter Header: 300, REQ, PXY, 16777216 >
  40. * < Session-Id >
  41. * { Vendor-Specific-Application-Id }
  42. * { Auth-Session-State }
  43. * { Origin-Host }
  44. * { Origin-Realm }
  45. * [ Destination-Host ]
  46. * { Destination-Realm }
  47. * { User-Name }
  48. * *[ Supported-Features ]
  49. * { Public-Identity }
  50. * { Visited-Network-Identifier }
  51. * [ User-Authorization-Type ]
  52. * [ UAR-Flags ]
  53. * *[ AVP ]
  54. * *[ Proxy-Info ]
  55. * *[ Route-Record ]
  56. *
  57. * </pre>
  58. *
  59. * @author <a href="mailto:brainslog@gmail.com"> Alexandre Mendonca </a>
  60. * @author <a href="mailto:baranowb@gmail.com"> Bartosz Baranowski </a>
  61. */
  62. public interface UserAuthorizationRequest extends DiameterMessage {
  63. public static final int COMMAND_CODE = 300;
  64. /**
  65. * Returns true if the Vendor-Specific-Application-Id AVP is present in the
  66. * message.
  67. */
  68. boolean hasVendorSpecificApplicationId();
  69. /**
  70. * Returns the value of the Vendor-Specific-Application-Id AVP, of type
  71. * Grouped.
  72. *
  73. * @return the value of the Vendor-Specific-Application-Id AVP or null if it
  74. * has not been set on this message
  75. */
  76. VendorSpecificApplicationIdAvp getVendorSpecificApplicationId();
  77. /**
  78. * Sets the value of the Vendor-Specific-Application-Id AVP, of type
  79. * Grouped.
  80. *
  81. * @throws IllegalStateException
  82. * if setVendorSpecificApplicationId has already been called
  83. */
  84. void setVendorSpecificApplicationId(VendorSpecificApplicationIdAvp vendorSpecificApplicationId);
  85. /**
  86. * Returns true if the Auth-Session-State AVP is present in the message.
  87. */
  88. boolean hasAuthSessionState();
  89. /**
  90. * Returns the value of the Auth-Session-State AVP, of type Enumerated. A
  91. * return value of null implies that the AVP has not been set.
  92. */
  93. AuthSessionStateType getAuthSessionState();
  94. /**
  95. * Sets the value of the Auth-Session-State AVP, of type Enumerated.
  96. *
  97. * @throws IllegalStateException
  98. * if setAuthSessionState has already been called
  99. */
  100. void setAuthSessionState(AuthSessionStateType authSessionState);
  101. /**
  102. * Returns true if the User-Name AVP is present in the message.
  103. */
  104. boolean hasUserName();
  105. /**
  106. * Returns the value of the User-Name AVP, of type UTF8String.
  107. * @return the value of the User-Name AVP or null if it has not been set on this message
  108. */
  109. String getUserName();
  110. /**
  111. * Sets the value of the User-Name AVP, of type UTF8String.
  112. * @throws IllegalStateException if setUserName has already been called
  113. */
  114. void setUserName(String userName);
  115. /**
  116. * Returns the set of Supported-Features AVPs. The returned array contains
  117. * the AVPs in the order they appear in the message. A return value of null
  118. * implies that no Supported-Features AVPs have been set. The elements in
  119. * the given array are SupportedFeatures objects.
  120. */
  121. SupportedFeaturesAvp[] getSupportedFeatureses();
  122. /**
  123. * Sets a single Supported-Features AVP in the message, of type Grouped.
  124. *
  125. * @throws IllegalStateException
  126. * if setSupportedFeatures or setSupportedFeatureses has already
  127. * been called
  128. */
  129. void setSupportedFeatures(SupportedFeaturesAvp supportedFeatures);
  130. /**
  131. * Sets the set of Supported-Features AVPs, with all the values in the given
  132. * array. The AVPs will be added to message in the order in which they
  133. * appear in the array.
  134. *
  135. * Note: the array must not be altered by the caller following this call,
  136. * and getSupportedFeatureses() is not guaranteed to return the same array
  137. * instance, e.g. an "==" check would fail.
  138. *
  139. * @throws IllegalStateException
  140. * if setSupportedFeatures or setSupportedFeatureses has already
  141. * been called
  142. */
  143. void setSupportedFeatureses(SupportedFeaturesAvp[] supportedFeatureses);
  144. /**
  145. * Returns true if the Public-Identity AVP is present in the message.
  146. */
  147. public boolean hasPublicIdentity();
  148. /**
  149. * Returns the value of the Public-Identity AVP, of type UTF8String.
  150. * A return value of null implies that the AVP has not been set.
  151. */
  152. public String getPublicIdentity();
  153. /**
  154. * Sets the value of the Public-Identity AVP, of type UTF8String.
  155. * @throws IllegalStateException if setPublicIdentity has already been called
  156. */
  157. public void setPublicIdentity(String publicIdentity);
  158. /**
  159. * Returns true if the Visited-Network-Identifier AVP is present in the message.
  160. */
  161. public boolean hasVisitedNetworkIdentifier();
  162. /**
  163. * Returns the value of the Visited-Network-Identifier AVP, of type OctetString.
  164. * A return value of null implies that the AVP has not been set.
  165. */
  166. public byte[] getVisitedNetworkIdentifier();
  167. /**
  168. * Sets the value of the Visited-Network-Identifier AVP, of type OctetString.
  169. * @throws IllegalStateException if setVisitedNetworkIdentifier has already been called
  170. */
  171. public void setVisitedNetworkIdentifier(byte[] visitedNetworkIdentifier);
  172. /**
  173. * Returns true if the User-Authorization-Type AVP is present in the message.
  174. */
  175. boolean hasUserAuthorizationType();
  176. /**
  177. * Returns the value of the User-Authorization-Type AVP, of type Enumerated. A
  178. * return value of null implies that the AVP has not been set.
  179. */
  180. UserAuthorizationType getUserAuthorizationType();
  181. /**
  182. * Sets the value of the User-Authorization-Type AVP, of type Enumerated.
  183. *
  184. * @throws IllegalStateException
  185. * if setAuthSessionState has already been called
  186. */
  187. void setUserAuthorizationType(UserAuthorizationType userAuthorizationType);
  188. /**
  189. * Returns true if the UAR-Flags AVP is present in the message.
  190. */
  191. public boolean hasUARFlags();
  192. /**
  193. * Returns the value of the UAR-Flags AVP, of type Unsigned32.
  194. * A return value of Long.MIN_VALUE implies that the AVP has not been set or some error has been encountered.
  195. */
  196. public long getUARFlags();
  197. /**
  198. * Sets the value of the UAR-Flags AVP, of type Unsigned32.
  199. * @throws IllegalStateException if setUARFlags has already been called
  200. */
  201. public void setUARFlags(long uarFlags);
  202. /**
  203. * Returns the set of Proxy-Info AVPs. The returned array contains
  204. * the AVPs in the order they appear in the message.
  205. * A return value of null implies that no Proxy-Info AVPs have been set.
  206. * The elements in the given array are ProxyInfo objects.
  207. */
  208. ProxyInfoAvp[] getProxyInfos();
  209. /**
  210. * Sets a single Proxy-Info AVP in the message, of type Grouped.
  211. * @throws IllegalStateException if setProxyInfo or setProxyInfos
  212. * has already been called
  213. */
  214. void setProxyInfo(ProxyInfoAvp proxyInfo);
  215. /**
  216. * Sets the set of Proxy-Info AVPs, with all the values in the given array.
  217. * The AVPs will be added to message in the order in which they appear in the array.
  218. *
  219. * Note: the array must not be altered by the caller following this call, and
  220. * getProxyInfos() is not guaranteed to return the same array instance,
  221. * e.g. an "==" check would fail.
  222. *
  223. * @throws IllegalStateException if setProxyInfo or setProxyInfos
  224. * has already been called
  225. */
  226. void setProxyInfos(ProxyInfoAvp[] proxyInfos);
  227. /**
  228. * Returns the set of Route-Record AVPs. The returned array contains
  229. * the AVPs in the order they appear in the message.
  230. * A return value of null implies that no Route-Record AVPs have been set.
  231. * The elements in the given array are DiameterIdentity objects.
  232. */
  233. DiameterIdentity[] getRouteRecords();
  234. /**
  235. * Sets a single Route-Record AVP in the message, of type DiameterIdentity.
  236. * @throws IllegalStateException if setRouteRecord or setRouteRecords
  237. * has already been called
  238. */
  239. void setRouteRecord(DiameterIdentity routeRecord);
  240. /**
  241. * Sets the set of Route-Record AVPs, with all the values in the given array.
  242. * The AVPs will be added to message in the order in which they appear in the array.
  243. *
  244. * Note: the array must not be altered by the caller following this call, and
  245. * getRouteRecords() is not guaranteed to return the same array instance,
  246. * e.g. an "==" check would fail.
  247. *
  248. * @throws IllegalStateException if setRouteRecord or setRouteRecords
  249. * has already been called
  250. */
  251. void setRouteRecords(DiameterIdentity[] routeRecords);
  252. }