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