/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

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