PageRenderTime 31ms CodeModel.GetById 23ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/RTPPkg/RTPParamRtppltype.java

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