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

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/NetworkPkg/NetworkParamCs.java

http://mobicents.googlecode.com/
Java | 99 lines | 30 code | 10 blank | 59 comment | 0 complexity | 3e9d7f36010a6e98e53f4a98f9092bbc MD5 | raw file
 1package javax.megaco.pkg.NetworkPkg;
 2
 3import javax.megaco.message.DescriptorType;
 4import javax.megaco.pkg.ParamValueType;
 5import javax.megaco.pkg.PkgConsts;
 6import javax.megaco.pkg.PkgItemParam;
 7
 8/**
 9 * The MEGACO parameter class for the Cause Parameter is associated with Network
10 * Failure event of Network Package. This class defines all the static
11 * information for this parameter.
12 */
13public class NetworkParamCs extends PkgItemParam {
14
15	/**
16	 * Identifies Cause parameter of the MEGACO Network Package. Its value shall
17	 * be set equal to 0x0001.
18	 */
19	public static final int NETWORK_PARAM_CS = 0x0001;
20
21	/**
22	 * Constructs a parameter class for Network package that specifies the
23	 * parameter as Cause.
24	 */
25	public NetworkParamCs() {
26		super();
27		super.paramId = NETWORK_PARAM_CS;
28		super.itemValueType = ParamValueType.M_STRING;
29		super.paramsItemIds = new int[] { NetworkNetfailEvt.NETWORK_NETFAIL_EVENT };
30		super.paramsDescriptorIds = new int[] { DescriptorType.M_OBSERVED_EVENT_DESC };
31	}
32
33	/**
34	 * The method can be used to get the parameter identifier as defined in the
35	 * MEGACO packages. The implementation of this method in this class returns
36	 * Id of Cause parameter.
37	 * 
38	 * @return paramId - Returns param id {@link NETWORK_PARAM_CS}.
39	 */
40	public int getParamId() {
41		return super.paramId;
42	}
43
44	/**
45	 * The method can be used to get the type of the parameter 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 ParamValueType.M_STRING}
50	 *         indicating that the parameter is a string.
51	 */
52	public int getParamValueType() {
53		return super.itemValueType;
54	}
55
56	/**
57	 * The method can be used to get the descriptor ids corresponding to the
58	 * parameters to which the parameter can be set.
59	 * 
60	 * @return This parameter can be present in Observed Event descriptor. It
61	 *         shall thus return a value
62	 *         {@link DescriptorType.M_OBSERVED_EVENT_DESC} as a part of integer
63	 *         vector.
64	 */
65	public int[] getParamsDescriptorIds() {
66		return super.paramsDescriptorIds;
67	}
68
69	/**
70	 * The method can be used to get the item ids corresponding to the
71	 * parameters to which the parameter can be set. This method specifies the
72	 * valid item (event/signal) ids to which the parameter can belong to.The
73	 * method can be used to get the item ids corresponding to the parameters to
74	 * which the parameter can be set. This method specifies the valid item
75	 * (event/signal) ids to which the parameter can belong to.
76	 * 
77	 * @return The integer value corresponding to Network Failure. Thus this
78	 *         shall return {@link NetworkNetfailEvt.NETWORK_NETFAIL_EVENT}.
79	 */
80	public int[] getParamsItemIds() {
81		return super.paramsItemIds;
82	}
83
84	/**
85	 * The method can be used to get the package id corresponding to the to
86	 * which the parameter can be set. This method specifies the package for
87	 * which the parameter is valid. Even though the parameter may be set for an
88	 * item, but the parameter may not be valid for package to which the item
89	 * belongs, but may be valid for a package which has extended this package.
90	 * 
91	 * @return This shall return {@link PkgConsts.NETWORK_PACKAGE} as the
92	 *         integer value. The integer values are defined in
93	 *         {@link PkgConsts}.
94	 */
95	public int getParamsPkgId() {
96		return PkgConsts.NETWORK_PACKAGE;
97	}
98
99}