PageRenderTime 16ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/ContinuityPkg/ContParamRes.java

http://mobicents.googlecode.com/
Java | 94 lines | 30 code | 11 blank | 53 comment | 0 complexity | ec664b1e3c68abb7e134c943564b2e72 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. package javax.megaco.pkg.ContinuityPkg;
  2. import javax.megaco.message.DescriptorType;
  3. import javax.megaco.pkg.ParamValueType;
  4. import javax.megaco.pkg.PkgConsts;
  5. import javax.megaco.pkg.PkgItemParam;
  6. /**
  7. * The MEGACO parameter class for the Result Parameter is associated with
  8. * Completion event of Continuity Package. This class defines all the static
  9. * information for this parameter.
  10. */
  11. public class ContParamRes extends PkgItemParam {
  12. /**
  13. * Identifies Result parameter of the MEGACO Continuity Package. Its value
  14. * shall be set equal to 0x0008.
  15. */
  16. public static final int CONT_PARAM_RES = 0x0008;
  17. /**
  18. * Constructs a parameter class for Continuity package that specifies the
  19. * parameter as Result.
  20. */
  21. public ContParamRes() {
  22. super();
  23. super.paramId = CONT_PARAM_RES;
  24. super.itemValueType = ParamValueType.M_STRING;
  25. super.paramsDescriptorIds = new int[] { DescriptorType.M_EVENT_DESC };
  26. super.paramsItemIds = new int[] { ContComplEvt.CONT_COMPL_EVENT };
  27. }
  28. /**
  29. * The method can be used to get the parameter identifier as defined in the
  30. * MEGACO packages. The implementation of this method in this class returns
  31. * Id of Result parameter.
  32. *
  33. * @return paramId - Returns param id {@link CONT_PARAM_RES}.
  34. */
  35. public int getParamId() {
  36. return super.paramId;
  37. }
  38. /**
  39. * The method can be used to get the type of the parameter as defined in the
  40. * MEGACO packages. These could be one of string or enumerated value or
  41. * integer or double value or boolean.
  42. *
  43. * @return It returns {@link STRING} indicating that the
  44. * parameter is a string.
  45. */
  46. public int getParamValueType() {
  47. return super.itemValueType;
  48. }
  49. /**
  50. * The method can be used to get the descriptor ids corresponding to the
  51. * parameters to which the parameter can be set.
  52. *
  53. * @return This parameter can be present in Event descriptor. It shall thus
  54. * return a value {@link EVENT_DESC} as a part of integer vector.
  55. */
  56. public int[] getParamsDescriptorIds() {
  57. return super.paramsDescriptorIds;
  58. }
  59. /**
  60. * The method can be used to get the item ids corresponding to the
  61. * parameters to which the parameter can be set. This method specifies the
  62. * valid item (event/signal) ids to which the parameter can belong to.
  63. *
  64. * @return The integer value corresponding to Completion. Thus this shall
  65. * return {@link CONT_COMPL_EVENT}.
  66. */
  67. public int[] getParamsItemIds() {
  68. return super.paramsItemIds;
  69. }
  70. /**
  71. * The method can be used to get the package id corresponding to the to
  72. * which the parameter can be set. This method specifies the package for
  73. * which the parameter is valid. Even though the parameter may be set for an
  74. * item, but the parameter may not be valid for package to which the item
  75. * belongs, but may be valid for a package which has extended this package.
  76. *
  77. * @return This shall return {@link CONTINUITY_PACKAGE} as the integer
  78. * value. The integer values are defined in {@link PkgConsts}.
  79. */
  80. public int getParamsPkgId() {
  81. return PkgConsts.CONTINUITY_PACKAGE;
  82. }
  83. }