/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/NetworkPkg/NetworkParamCs.java

http://mobicents.googlecode.com/ · Java · 99 lines · 30 code · 10 blank · 59 comment · 0 complexity · 3e9d7f36010a6e98e53f4a98f9092bbc MD5 · raw file

  1. package javax.megaco.pkg.NetworkPkg;
  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 Cause Parameter is associated with Network
  8. * Failure event of Network Package. This class defines all the static
  9. * information for this parameter.
  10. */
  11. public class NetworkParamCs extends PkgItemParam {
  12. /**
  13. * Identifies Cause parameter of the MEGACO Network Package. Its value shall
  14. * be set equal to 0x0001.
  15. */
  16. public static final int NETWORK_PARAM_CS = 0x0001;
  17. /**
  18. * Constructs a parameter class for Network package that specifies the
  19. * parameter as Cause.
  20. */
  21. public NetworkParamCs() {
  22. super();
  23. super.paramId = NETWORK_PARAM_CS;
  24. super.itemValueType = ParamValueType.M_STRING;
  25. super.paramsItemIds = new int[] { NetworkNetfailEvt.NETWORK_NETFAIL_EVENT };
  26. super.paramsDescriptorIds = new int[] { DescriptorType.M_OBSERVED_EVENT_DESC };
  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 Cause parameter.
  32. *
  33. * @return paramId - Returns param id {@link NETWORK_PARAM_CS}.
  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 ParamValueType.M_STRING}
  44. * indicating that the 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 Observed Event descriptor. It
  54. * shall thus return a value
  55. * {@link DescriptorType.M_OBSERVED_EVENT_DESC} as a part of integer
  56. * vector.
  57. */
  58. public int[] getParamsDescriptorIds() {
  59. return super.paramsDescriptorIds;
  60. }
  61. /**
  62. * The method can be used to get the item ids corresponding to the
  63. * parameters to which the parameter can be set. This method specifies the
  64. * valid item (event/signal) ids to which the parameter can belong to.The
  65. * method can be used to get the item ids corresponding to the parameters to
  66. * which the parameter can be set. This method specifies the valid item
  67. * (event/signal) ids to which the parameter can belong to.
  68. *
  69. * @return The integer value corresponding to Network Failure. Thus this
  70. * shall return {@link NetworkNetfailEvt.NETWORK_NETFAIL_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 {@link PkgConsts.NETWORK_PACKAGE} as the
  83. * integer value. The integer values are defined in
  84. * {@link PkgConsts}.
  85. */
  86. public int getParamsPkgId() {
  87. return PkgConsts.NETWORK_PACKAGE;
  88. }
  89. }