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

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

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