/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/GenericPkg/GenCauseEvent.java

http://mobicents.googlecode.com/ · Java · 66 lines · 21 code · 11 blank · 34 comment · 0 complexity · a8819bd8549eb4d85f0449d163b63a88 MD5 · raw file

  1. package javax.megaco.pkg.GenericPkg;
  2. import javax.megaco.pkg.MegacoPkg;
  3. import javax.megaco.pkg.PkgEventItem;
  4. /**
  5. * The MEGACO Cause Event class extends the PkgEventItem class. This is a final
  6. * class. This class defines Cause Event of MEGACO Generic package. The methods
  7. * shall define that this event item belongs to the Generic package.
  8. */
  9. public class GenCauseEvent extends PkgEventItem {
  10. /**
  11. * Identifies Cause event of the MEGACO Generic Package.
  12. */
  13. public static final int GEN_CAUSE_EVENT = 0x0001;
  14. /**
  15. *
  16. * Constructs a Jain MEGACO object representing the Cause event of the
  17. * Generic package.
  18. */
  19. public GenCauseEvent() {
  20. super();
  21. super.packageId = new GenericPkg();
  22. super.itemId = GEN_CAUSE_EVENT;
  23. super.eventId = GEN_CAUSE_EVENT;
  24. }
  25. /**
  26. * This method is used to get the event identifier from an Event Item
  27. * object. The implementations of this method in this class returns the id
  28. * of the Cause event of Generic Package.
  29. *
  30. * @return It shall return {@link GEN_CAUSE_EVENT}.
  31. */
  32. public final int getEventId() {
  33. return super.eventId;
  34. }
  35. /**
  36. * This method is used to get the item identifier from an Item object. The
  37. * implementations of this method in this class returns the id of the Cause
  38. * event of Generic Package
  39. *
  40. * @return It shall return {@link GEN_CAUSE_EVENT}.
  41. */
  42. public final int getItemId() {
  43. return super.itemId;
  44. }
  45. /**
  46. * This method gets the package to which the item belongs. Since the Generic
  47. * Cause event is defined in the Generic Package of MEGACO protocol, this
  48. * method returns the GenericPkg class object.
  49. *
  50. * @return The package is {@link GenericPkg}.
  51. */
  52. public MegacoPkg getItemsPkgId() {
  53. return super.packageId;
  54. }
  55. }