/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/BaseRootPkg/RootMaxNrOfCtxtPrpt.java
Java | 98 lines | 32 code | 14 blank | 52 comment | 0 complexity | 3f18a022e86402227f8e495d776bc5ca MD5 | raw file
1package javax.megaco.pkg.BaseRootPkg; 2 3import javax.megaco.message.DescriptorType; 4import javax.megaco.pkg.MegacoPkg; 5import javax.megaco.pkg.ParamValueType; 6import javax.megaco.pkg.PkgConsts; 7import javax.megaco.pkg.PkgPrptyItem; 8 9/** 10 * The MEGACO MaxTermsPerCtxt property class extends the PkgPrptyItem class. 11 * This is a final class. This class defines MaxTermsPerCtxt property of MEGACO 12 * Root package. The methods shall define that this property item belongs to the 13 * Root package. 14 */ 15public final class RootMaxNrOfCtxtPrpt extends PkgPrptyItem { 16 17 /** 18 * Identifies MaxTermsPerCtxt property of the MEGACO Base Root Package. Its 19 * value shall be set equal to 0x0002. 20 */ 21 public static final int ROOT_MAX_NR_OF_CTXT_PRPT = 0x0001; 22 23 protected int[] itemsDescriptorIds = null; 24 25 /** 26 * Constructs a Jain MEGACO Object representing property item of the MEGACO 27 * Package for property MaxTermsPerCtxt and Package as Base Root. 28 */ 29 public RootMaxNrOfCtxtPrpt() { 30 super(); 31 super.itemId = ROOT_MAX_NR_OF_CTXT_PRPT; 32 super.itemType = ParamValueType.M_DOUBLE; 33 super.packageId = new BaseRootPkg(); 34 35 this.itemsDescriptorIds = new int[] { DescriptorType.M_TERMINATION_STATE_DESC }; 36 } 37 38 /** 39 * This method is used to get the item identifier from an Item object. The 40 * implementations of this method in this class returns the id of the 41 * Maximum Number of Context property of ROOT Package. 42 * 43 * @return It shall return {@link ROOT_MAX_NR_OF_CTXT_PRPT}. 44 */ 45 public int getItemId() { 46 47 return super.itemId; 48 } 49 50 /** 51 * The method can be used to get the type of the value as defined in the 52 * MEGACO packages. These could be one of string or enumerated value or 53 * integer or double value or boolean. 54 * 55 * @return It returns {@link DOUBLE} indicating that the 56 * parameter is a double. 57 */ 58 public int getItemValueType() { 59 return super.itemType; 60 } 61 62 /** 63 * This method is used to get the property identifier from an Property Item 64 * object. The implementations of this method in this class returns the id 65 * of the Maximum Number of Context property of ROOT Package. 66 * 67 * @return It shall return {@link ROOT_MAX_NR_OF_CTXT_PRPT}. 68 */ 69 public int getPropertyId() {// TODO Auto-generated method stub 70 return ROOT_MAX_NR_OF_CTXT_PRPT; 71 } 72 73 /** 74 * This method gets the package id to which the item belongs. Since the 75 * Maximum Number of Context property is defined in the Base ROOT Package of 76 * MEGACO protocol, this method returns the value {@link BASE_ROOT_PACKAGE} 77 * constant. This constant is defined in the {@link PkgConsts} class. 78 * 79 * @return The package id {@link BASE_ROOT_PACKAGE}. 80 */ 81 public MegacoPkg getItemsPkgId() { 82 83 return super.packageId; 84 } 85 86 /** 87 * The method can be used to get the descriptor ids corresponding to the 88 * parameters to which the parameter can be set. 89 * 90 * @return This parameter can be present in Event descriptor. It shall thus 91 * return a value {@link M_TERMINATION_STATE_DESC} as a part of 92 * integer vector. 93 */ 94 public int[] getItemsDescriptorIds() { 95 return this.itemsDescriptorIds; 96 } 97 98}