/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/RTPPkg/RTPParamRtppltype.java

http://mobicents.googlecode.com/ · Java · 101 lines · 30 code · 12 blank · 59 comment · 0 complexity · eb3c32b523fbd2ae115e56095b9a9ef3 MD5 · raw file

  1. package javax.megaco.pkg.RTPPkg;
  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 Payload Type Parameter is associated with
  8. * Payload Transition event of RTP Package. This class defines all the static
  9. * information for this parameter.
  10. */
  11. public class RTPParamRtppltype extends PkgItemParam {
  12. /**
  13. * Identifies Payload Type parameter of the MEGACO RTP Package. Its value
  14. * shall be set equal to 0x01.
  15. */
  16. public static final int RTP_PARAM_PL_TYPE = 0x0001;
  17. /**
  18. * Constructs a parameter class for RTP package that specifies the parameter
  19. * as Payload Type.
  20. */
  21. public RTPParamRtppltype() {
  22. super();
  23. super.paramId = RTP_PARAM_PL_TYPE;
  24. super.itemValueType = ParamValueType.M_STRING;
  25. super.paramsDescriptorIds = new int[] { DescriptorType.M_OBSERVED_EVENT_DESC };
  26. super.paramsItemIds = new int[] { RTPPltransEvt.RTP_PLTRANS_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 Payload Type parameter.
  32. *
  33. * @return paramId - Returns param id as {@link RTP_PARAM_PL_TYPE}.
  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. *
  44. * @ return It returns {@link ParamValueType.M_STRING}
  45. * indicating that the parameter is a string.
  46. */
  47. public int getParamValueType() {
  48. return super.itemValueType;
  49. }
  50. /**
  51. * The method can be used to get the descriptor ids corresponding to the
  52. * parameters to which the parameter can be set.
  53. *
  54. *
  55. *
  56. * @return This parameter can be present in Observed Event descriptor. It
  57. * shall thus return a value
  58. * {@link DescriptorType.M_OBSERVED_EVENT_DESC} as a part of integer
  59. * vector.
  60. */
  61. public int[] getParamsDescriptorIds() {
  62. return super.paramsDescriptorIds;
  63. }
  64. /**
  65. * The method can be used to get the item ids corresponding to the
  66. * parameters to which the parameter can be set. This method specifies the
  67. * valid item (event/signal) ids to which the parameter can belong to.
  68. *
  69. * @return The integer value corresponding to Payload Transition event. Thus
  70. * this shall return {@link RTPPltransEvt.RTP_PLTRANS_EVENT}.
  71. */
  72. public int[] getParamsItemIds() {
  73. return super.paramsItemIds;
  74. }
  75. /**
  76. * The method can be used to get the package id corresponding to the to
  77. * which the parameter can be set. This method specifies the package for
  78. * which the parameter is valid. Even though the parameter may be set for an
  79. * item, but the parameter may not be valid for package to which the item
  80. * belongs, but may be valid for a package which has extended this package.
  81. *
  82. * @return This shall return RTP_PACKAGE as the integer value. The integer
  83. * values are defined in PkgConsts.
  84. *
  85. */
  86. public int getParamsPkgId() {
  87. return PkgConsts.RTP_PACKAGE;
  88. }
  89. }