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

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

http://mobicents.googlecode.com/
Java | 49 lines | 15 code | 8 blank | 26 comment | 0 complexity | 24576ac38658beba38678727a082650a MD5 | raw file
 1package javax.megaco.pkg.RTPPkg;
 2
 3import javax.megaco.pkg.MegacoPkg;
 4import javax.megaco.pkg.PkgConsts;
 5
 6/**
 7 * The MEGACO RTP Package inherits all methods of the Package, but overrides the
 8 * getPkgId and getPkgName to define packageid corresponding to the RTP Package.
 9 * This class also overrides the getExtendedPkgIds to define that this package
10 * extends MEGACO Network Package.
11 */
12public class RTPPkg extends MegacoPkg {
13
14	private int[] extendedPkgIds = new int[]{PkgConsts.NETWORK_PACKAGE};
15
16	/**
17	 * Constructs a MEGACO RTP Package.
18	 */
19	public RTPPkg() {
20		super();
21		// TODO Auto-generated constructor stub
22	}
23
24	/**
25	 * This method gets the package ids of all the package which the package had
26	 * directly or indirectly extended. Package ids are defined in
27	 * {@link PkgConsts}.
28	 * 
29	 * @return Since this packge extends MEGACO Network package, this shall
30	 *         return {@link PkgConsts.RTP_PACKAGE}.
31	 */
32	public int[] getExtendedPkgIds() {
33
34		return extendedPkgIds;
35	}
36
37	/**
38	 * This method return the package Id of the MEGACO package for which the
39	 * object is created. For RTP Package constant value
40	 * {@link PkgConsts.RTP_PACKAGE} shall be returned.
41	 * 
42	 * @return Constant value {@link PkgConsts.RTP_PACKAGE} indicating
43	 *         Continuity Package..
44	 */
45	public int getPkgId() {
46
47		return PkgConsts.RTP_PACKAGE;
48	}
49}