/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/ToneGenPkg/ToneGenPlayToneSignal.java

http://mobicents.googlecode.com/ · Java · 66 lines · 21 code · 10 blank · 35 comment · 0 complexity · a5391c9c4af811c6207bca4fb41ddaf9 MD5 · raw file

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