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

http://mobicents.googlecode.com/ · Java · 94 lines · 32 code · 13 blank · 49 comment · 0 complexity · 6dee8c949f452c18979dc0346af01d4f MD5 · raw file

  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.PkgPrptyItem;
  6. /**
  7. * The MEGACO MaxTermsPerCtxt property class extends the PkgPrptyItem class.
  8. * This is a final class. This class defines MaxTermsPerCtxt property of MEGACO
  9. * Root package. The methods shall define that this property item belongs to the
  10. * Root package.
  11. */
  12. public final class RootMaxTermsPerCtxtPrpt extends PkgPrptyItem {
  13. /**
  14. * Identifies MaxTermsPerCtxt property of the MEGACO Base Root Package. Its
  15. * value shall be set equal to 0x0002.
  16. */
  17. public static final int ROOT_MAX_TERMS_PER_CTXT_PRPT = 0x0002;
  18. protected int[] itemsDescriptorIds = null;
  19. public RootMaxTermsPerCtxtPrpt() {
  20. super();
  21. super.propertyId = ROOT_MAX_TERMS_PER_CTXT_PRPT;
  22. super.itemId = ROOT_MAX_TERMS_PER_CTXT_PRPT;
  23. super.packageId = new BaseRootPkg();
  24. super.itemValueType = ParamValueType.M_INTEGER;
  25. this.itemsDescriptorIds = new int[] { DescriptorType.M_TERMINATION_STATE_DESC };
  26. }
  27. /**
  28. * This method is used to get the item identifier from an Item object. The
  29. * implementations of this method in this class returns the id of the
  30. * Maximum Terminations per Context property of ROOT Package.
  31. *
  32. * @return It shall return {@link ROOT_MAX_TERMS_PER_CTXT_PRPT}
  33. */
  34. public int getItemId() {
  35. return super.itemId;
  36. }
  37. /**
  38. * The method can be used to get the type of the value as defined in the
  39. * MEGACO packages. These could be one of string or enumerated value or
  40. * integer or double value or boolean.
  41. *
  42. * @return It returns {@link INTEGER} indicating that the
  43. * parameter is a double.
  44. */
  45. public int getItemValueType() {
  46. return super.itemValueType;
  47. }
  48. /**
  49. * This method is used to get the property identifier from an Property Item
  50. * object. The implementations of this method in this class returns the id
  51. * of the Maximum Termination per Context property of ROOT Package.
  52. *
  53. * @return It shall return {@link ROOT_MAX_TERMS_PER_CTXT_PRPT}
  54. */
  55. public int getPropertyId() {
  56. return super.propertyId;
  57. }
  58. /**
  59. * This method gets the package id to which the item belongs. Since the
  60. * Maximum Termination per Context property is defined in the Base ROOT
  61. * Package of MEGACO protocol, this method returns the value
  62. * BASE_ROOT_PACKAGE constant. This constant is defined in the PkgConsts
  63. * class.
  64. *
  65. * @return The package id {@link BASE_ROOT_PACKAGE}.
  66. */
  67. public MegacoPkg getItemsPkgId() {
  68. return this.packageId;
  69. }
  70. /**
  71. * The method can be used to get the descriptor ids corresponding to the
  72. * parameters to which the parameter can be set.
  73. *
  74. * @return This parameter can be present in Event descriptor. It shall thus
  75. * return a value {@link M_TERMINATION_STATE_DESC} as a part of
  76. * integer vector.
  77. */
  78. public int[] getItemsDescriptorIds() {
  79. return itemsDescriptorIds;
  80. }
  81. }