/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/ToneDetPkg/ToneEtdEvent.java

http://mobicents.googlecode.com/ · Java · 65 lines · 21 code · 9 blank · 35 comment · 0 complexity · 1383f181779a46c05f019bbf01ada56b MD5 · raw file

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