PageRenderTime 16ms CodeModel.GetById 2ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/BaseRootPkg/RootMaxTermsPerCtxtPrpt.java

http://mobicents.googlecode.com/
Java | 94 lines | 32 code | 13 blank | 49 comment | 0 complexity | 6dee8c949f452c18979dc0346af01d4f MD5 | raw file
 1package javax.megaco.pkg.BaseRootPkg;
 2
 3import javax.megaco.message.DescriptorType;
 4import javax.megaco.pkg.MegacoPkg;
 5import javax.megaco.pkg.ParamValueType;
 6import javax.megaco.pkg.PkgPrptyItem;
 7
 8/**
 9 * The MEGACO MaxTermsPerCtxt property class extends the PkgPrptyItem class.
10 * This is a final class. This class defines MaxTermsPerCtxt property of MEGACO
11 * Root package. The methods shall define that this property item belongs to the
12 * Root package.
13 */
14public final class RootMaxTermsPerCtxtPrpt extends PkgPrptyItem {
15
16	/**
17	 * Identifies MaxTermsPerCtxt property of the MEGACO Base Root Package. Its
18	 * value shall be set equal to 0x0002.
19	 */
20	public static final int ROOT_MAX_TERMS_PER_CTXT_PRPT = 0x0002;
21
22	protected int[] itemsDescriptorIds = null;
23
24	public RootMaxTermsPerCtxtPrpt() {
25		super();
26		super.propertyId = ROOT_MAX_TERMS_PER_CTXT_PRPT;
27		super.itemId = ROOT_MAX_TERMS_PER_CTXT_PRPT;
28		super.packageId = new BaseRootPkg();
29		super.itemValueType = ParamValueType.M_INTEGER;
30		this.itemsDescriptorIds = new int[] { DescriptorType.M_TERMINATION_STATE_DESC };
31	}
32
33	/**
34	 * This method is used to get the item identifier from an Item object. The
35	 * implementations of this method in this class returns the id of the
36	 * Maximum Terminations per Context property of ROOT Package.
37	 * 
38	 * @return It shall return {@link ROOT_MAX_TERMS_PER_CTXT_PRPT}
39	 */
40	public int getItemId() {
41		return super.itemId;
42	}
43
44	/**
45	 * The method can be used to get the type of the value as defined in the
46	 * MEGACO packages. These could be one of string or enumerated value or
47	 * integer or double value or boolean.
48	 * 
49	 * @return It returns {@link INTEGER} indicating that the
50	 *         parameter is a double.
51	 */
52	public int getItemValueType() {
53
54		return super.itemValueType;
55	}
56
57	/**
58	 * This method is used to get the property identifier from an Property Item
59	 * object. The implementations of this method in this class returns the id
60	 * of the Maximum Termination per Context property of ROOT Package.
61	 * 
62	 * @return It shall return {@link ROOT_MAX_TERMS_PER_CTXT_PRPT}
63	 */
64	public int getPropertyId() {
65
66		return super.propertyId;
67	}
68
69	/**
70	 * This method gets the package id to which the item belongs. Since the
71	 * Maximum Termination per Context property is defined in the Base ROOT
72	 * Package of MEGACO protocol, this method returns the value
73	 * BASE_ROOT_PACKAGE constant. This constant is defined in the PkgConsts
74	 * class.
75	 * 
76	 * @return The package id {@link BASE_ROOT_PACKAGE}.
77	 */
78	public MegacoPkg getItemsPkgId() {
79		return this.packageId;
80	}
81
82	/**
83	 * The method can be used to get the descriptor ids corresponding to the
84	 * parameters to which the parameter can be set.
85	 * 
86	 * @return This parameter can be present in Event descriptor. It shall thus
87	 *         return a value {@link M_TERMINATION_STATE_DESC} as a part of
88	 *         integer vector.
89	 */
90	public int[] getItemsDescriptorIds() {
91		return itemsDescriptorIds;
92	}
93
94}