PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/CPToneDetPkg/CPToneDetCrEvt.java

http://mobicents.googlecode.com/
Java | 68 lines | 21 code | 11 blank | 36 comment | 0 complexity | 00cbe6ac3a5c63fe2c06ab3d33f2f8ec MD5 | raw file
 1package javax.megaco.pkg.CPToneDetPkg;
 2
 3import javax.megaco.pkg.MegacoPkg;
 4import javax.megaco.pkg.PkgEventItem;
 5
 6/**
 7 * The MEGACO Caller Waiting Tone event class extends the PkgEventItem class.
 8 * This is a final class. This class defines Caller Waiting Tone event of MEGACO
 9 * Call Progress Tone Detect package. The methods shall define that this event
10 * item belongs to the Call Progress Tone Detect package.
11 */
12public final class CPToneDetCrEvt extends PkgEventItem {
13
14	/**
15	 * Identifies Caller Waiting Tone event of the MEGACO Call Progress Tone
16	 * Detect Package. Its value shall be set equal to 0x0038.
17	 */
18	public static final int CP_TONE_DET_CR_EVENT = 0x0038;
19
20	private CPToneDetPkg itemsPackageId = new CPToneDetPkg();
21
22	/**
23	 * Constructs a Jain MEGACO Object representing event Item of the MEGACO
24	 * Package for event Caller Waiting Tone and Package as Call Progress Tone
25	 * Detect.
26	 */
27	public CPToneDetCrEvt() {
28		super();
29		super.itemId = CP_TONE_DET_CR_EVENT;
30		super.eventId = CP_TONE_DET_CR_EVENT;
31	}
32
33	/**
34	 * This method is used to get the event identifier from an Event Item
35	 * object. The implementations of this method in this class returns the id
36	 * of the Caller Waiting event of Call Progress Tone Detect Package.
37	 * 
38	 * @return It shall return {@link CP_TONE_DET_CR_EVENT}.
39	 */
40	public int getEventId() {
41
42		return super.eventId;
43	}
44
45	/**
46	 * This method is used to get the item identifier from an Item object. The
47	 * implementations of this method in this class returns the id of the Caller
48	 * Waiting event of Call Progress Tone Detect Package.
49	 * 
50	 * @return It shall return {@link CP_TONE_DET_CR_EVENT}.
51	 */
52	public int getItemId() {
53
54		return super.itemId;
55	}
56
57	/**
58	 * This method gets the package to which the item belongs. Since the Caller
59	 * Waiting Tone event is defined in the Call Progress Tone Detect Package of
60	 * MEGACO protocol, this method returns the CPToneDetPkg class object.
61	 * 
62	 * @return
63	 */
64	public MegacoPkg getItemsPackageId() {
65		return itemsPackageId;
66	}
67
68}