PageRenderTime 35ms CodeModel.GetById 26ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/GenericPkg/GenCauseEvent.java

http://mobicents.googlecode.com/
Java | 66 lines | 21 code | 11 blank | 34 comment | 0 complexity | a8819bd8549eb4d85f0449d163b63a88 MD5 | raw file
 1package javax.megaco.pkg.GenericPkg;
 2
 3import javax.megaco.pkg.MegacoPkg;
 4import javax.megaco.pkg.PkgEventItem;
 5
 6/**
 7 * The MEGACO Cause Event class extends the PkgEventItem class. This is a final
 8 * class. This class defines Cause Event of MEGACO Generic package. The methods
 9 * shall define that this event item belongs to the Generic package.
10 */
11public class GenCauseEvent extends PkgEventItem {
12
13	/**
14	 * Identifies Cause event of the MEGACO Generic Package.
15	 */
16	public static final int GEN_CAUSE_EVENT = 0x0001;
17
18	/**
19	 * 
20	 * Constructs a Jain MEGACO object representing the Cause event of the
21	 * Generic package.
22	 */
23	public GenCauseEvent() {
24		super();
25		super.packageId = new GenericPkg();
26		super.itemId = GEN_CAUSE_EVENT;
27		super.eventId = GEN_CAUSE_EVENT;
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 Cause event of Generic Package.
35	 * 
36	 * @return It shall return {@link GEN_CAUSE_EVENT}.
37	 */
38	public final int getEventId() {
39
40		return super.eventId;
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 Cause
46	 * event of Generic Package
47	 * 
48	 * @return It shall return {@link GEN_CAUSE_EVENT}.
49	 */
50	public final int getItemId() {
51
52		return super.itemId;
53	}
54
55	/**
56	 * This method gets the package to which the item belongs. Since the Generic
57	 * Cause event is defined in the Generic Package of MEGACO protocol, this
58	 * method returns the GenericPkg class object.
59	 * 
60	 * @return The package is {@link GenericPkg}.
61	 */
62	public MegacoPkg getItemsPkgId() {
63		return super.packageId;
64	}
65
66}