PageRenderTime 34ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/BaseRootPkg/RootMaxNrOfCtxtPrpt.java

http://mobicents.googlecode.com/
Java | 98 lines | 32 code | 14 blank | 52 comment | 0 complexity | 3f18a022e86402227f8e495d776bc5ca 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.BaseRootPkg;
  2. import javax.megaco.message.DescriptorType;
  3. import javax.megaco.pkg.MegacoPkg;
  4. import javax.megaco.pkg.ParamValueType;
  5. import javax.megaco.pkg.PkgConsts;
  6. import javax.megaco.pkg.PkgPrptyItem;
  7. /**
  8. * The MEGACO MaxTermsPerCtxt property class extends the PkgPrptyItem class.
  9. * This is a final class. This class defines MaxTermsPerCtxt property of MEGACO
  10. * Root package. The methods shall define that this property item belongs to the
  11. * Root package.
  12. */
  13. public final class RootMaxNrOfCtxtPrpt extends PkgPrptyItem {
  14. /**
  15. * Identifies MaxTermsPerCtxt property of the MEGACO Base Root Package. Its
  16. * value shall be set equal to 0x0002.
  17. */
  18. public static final int ROOT_MAX_NR_OF_CTXT_PRPT = 0x0001;
  19. protected int[] itemsDescriptorIds = null;
  20. /**
  21. * Constructs a Jain MEGACO Object representing property item of the MEGACO
  22. * Package for property MaxTermsPerCtxt and Package as Base Root.
  23. */
  24. public RootMaxNrOfCtxtPrpt() {
  25. super();
  26. super.itemId = ROOT_MAX_NR_OF_CTXT_PRPT;
  27. super.itemType = ParamValueType.M_DOUBLE;
  28. super.packageId = new BaseRootPkg();
  29. this.itemsDescriptorIds = new int[] { DescriptorType.M_TERMINATION_STATE_DESC };
  30. }
  31. /**
  32. * This method is used to get the item identifier from an Item object. The
  33. * implementations of this method in this class returns the id of the
  34. * Maximum Number of Context property of ROOT Package.
  35. *
  36. * @return It shall return {@link ROOT_MAX_NR_OF_CTXT_PRPT}.
  37. */
  38. public int getItemId() {
  39. return super.itemId;
  40. }
  41. /**
  42. * The method can be used to get the type of the value as defined in the
  43. * MEGACO packages. These could be one of string or enumerated value or
  44. * integer or double value or boolean.
  45. *
  46. * @return It returns {@link DOUBLE} indicating that the
  47. * parameter is a double.
  48. */
  49. public int getItemValueType() {
  50. return super.itemType;
  51. }
  52. /**
  53. * This method is used to get the property identifier from an Property Item
  54. * object. The implementations of this method in this class returns the id
  55. * of the Maximum Number of Context property of ROOT Package.
  56. *
  57. * @return It shall return {@link ROOT_MAX_NR_OF_CTXT_PRPT}.
  58. */
  59. public int getPropertyId() {// TODO Auto-generated method stub
  60. return ROOT_MAX_NR_OF_CTXT_PRPT;
  61. }
  62. /**
  63. * This method gets the package id to which the item belongs. Since the
  64. * Maximum Number of Context property is defined in the Base ROOT Package of
  65. * MEGACO protocol, this method returns the value {@link BASE_ROOT_PACKAGE}
  66. * constant. This constant is defined in the {@link PkgConsts} class.
  67. *
  68. * @return The package id {@link BASE_ROOT_PACKAGE}.
  69. */
  70. public MegacoPkg getItemsPkgId() {
  71. return super.packageId;
  72. }
  73. /**
  74. * The method can be used to get the descriptor ids corresponding to the
  75. * parameters to which the parameter can be set.
  76. *
  77. * @return This parameter can be present in Event descriptor. It shall thus
  78. * return a value {@link M_TERMINATION_STATE_DESC} as a part of
  79. * integer vector.
  80. */
  81. public int[] getItemsDescriptorIds() {
  82. return this.itemsDescriptorIds;
  83. }
  84. }