PageRenderTime 16ms CodeModel.GetById 10ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://mobicents.googlecode.com/
Java | 95 lines | 32 code | 13 blank | 50 comment | 0 complexity | b4d8bdcfd95fa65f35d70146e01aeba9 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 ProvisionalResponseTimer property class extends the PkgPrptyItem
10 * class. This is a final class. This class defines ProvisionalResponseTimer
11 * property of MEGACO Root package. The methods shall define that this property
12 * item belongs to the Root package.
13 */
14public final class RootProvRespTimePrpt extends PkgPrptyItem {
15	/**
16	 *Identifies Provisional response timer property of the MEGACO Base Root
17	 * Package. Its value shall be set equal to 0x0005.
18	 */
19	public static final int ROOT_PROV_RESP_TIME_PRPT = 0x0005;
20
21	protected int[] itemsDescriptorIds = null;
22
23	/**
24	 * Constructs a Jain MEGACO Object representing property item of the MEGACO
25	 * Package for property ProvisionalResponseTimer and Package as Base Root.
26	 */
27	public RootProvRespTimePrpt() {
28		super();
29		super.propertyId = ROOT_PROV_RESP_TIME_PRPT;
30		super.itemId = ROOT_PROV_RESP_TIME_PRPT;
31		super.packageId = new BaseRootPkg();
32		super.itemValueType = ParamValueType.M_INTEGER;
33
34		this.itemsDescriptorIds = new int[] { DescriptorType.M_TERMINATION_STATE_DESC };
35	}
36
37	/**
38	 * This method is used to get the item identifier from an Item object. The
39	 * implementations of this method in this class returns the id of the
40	 * Provisional Response Time property of ROOT Package.
41	 * 
42	 * @return It shall return {@link ROOT_PROV_RESP_TIME_PRPT}
43	 */
44	public int getItemId() {
45		return super.itemId;
46	}
47
48	/**
49	 * The method can be used to get the type of the value as defined in the
50	 * MEGACO packages. These could be one of string or enumerated value or
51	 * integer or double value or boolean.
52	 * 
53	 * @return It returns {@link ParamValueType.INTEGER}
54	 *         indicating that the parameter is a double.
55	 */
56	public int getItemValueType() {
57		return super.itemValueType;
58	}
59
60	/**
61	 * This method is used to get the property identifier from an Property Item
62	 * object. The implementations of this method in this class returns the id
63	 * of the Provisional Response Time property of ROOT Package.
64	 * 
65	 * @return It shall return {@link ROOT_PROV_RESP_TIME_PRPT}
66	 */
67	public int getPropertyId() {
68
69		return super.propertyId;
70	}
71
72	/**
73	 * This method gets the package id to which the item belongs. Since the
74	 * Provisional Response Time property is defined in the Base ROOT Package of
75	 * MEGACO protocol, this method returns the value {@link BASE_ROOT_PACKAGE}
76	 * constant. This constant is defined in the PkgConsts class.
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 DescriptorType.M_TERMINATION_STATE_DESC as a part
88	 *         of integer vector.
89	 */
90	public int[] getDescriptorIds() {
91		return this.itemsDescriptorIds;
92
93	}
94
95}