PageRenderTime 23ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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