/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/ContinuityPkg/ContParamRes.java
Java | 94 lines | 30 code | 11 blank | 53 comment | 0 complexity | ec664b1e3c68abb7e134c943564b2e72 MD5 | raw file
1package javax.megaco.pkg.ContinuityPkg; 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 Result Parameter is associated with 10 * Completion event of Continuity Package. This class defines all the static 11 * information for this parameter. 12 */ 13public class ContParamRes extends PkgItemParam { 14 15 /** 16 * Identifies Result parameter of the MEGACO Continuity Package. Its value 17 * shall be set equal to 0x0008. 18 */ 19 public static final int CONT_PARAM_RES = 0x0008; 20 21 /** 22 * Constructs a parameter class for Continuity package that specifies the 23 * parameter as Result. 24 */ 25 public ContParamRes() { 26 super(); 27 super.paramId = CONT_PARAM_RES; 28 super.itemValueType = ParamValueType.M_STRING; 29 super.paramsDescriptorIds = new int[] { DescriptorType.M_EVENT_DESC }; 30 super.paramsItemIds = new int[] { ContComplEvt.CONT_COMPL_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 Result parameter. 37 * 38 * @return paramId - Returns param id {@link CONT_PARAM_RES}. 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 * @return It returns {@link STRING} indicating that the 51 * parameter is a string. 52 */ 53 public int getParamValueType() { 54 return super.itemValueType; 55 } 56 57 /** 58 * The method can be used to get the descriptor ids corresponding to the 59 * parameters to which the parameter can be set. 60 * 61 * @return This parameter can be present in Event descriptor. It shall thus 62 * return a value {@link EVENT_DESC} as a part of integer vector. 63 */ 64 public int[] getParamsDescriptorIds() { 65 return super.paramsDescriptorIds; 66 } 67 68 /** 69 * The method can be used to get the item ids corresponding to the 70 * parameters to which the parameter can be set. This method specifies the 71 * valid item (event/signal) ids to which the parameter can belong to. 72 * 73 * @return The integer value corresponding to Completion. Thus this shall 74 * return {@link CONT_COMPL_EVENT}. 75 */ 76 public int[] getParamsItemIds() { 77 return super.paramsItemIds; 78 } 79 80 /** 81 * The method can be used to get the package id corresponding to the to 82 * which the parameter can be set. This method specifies the package for 83 * which the parameter is valid. Even though the parameter may be set for an 84 * item, but the parameter may not be valid for package to which the item 85 * belongs, but may be valid for a package which has extended this package. 86 * 87 * @return This shall return {@link CONTINUITY_PACKAGE} as the integer 88 * value. The integer values are defined in {@link PkgConsts}. 89 */ 90 public int getParamsPkgId() { 91 return PkgConsts.CONTINUITY_PACKAGE; 92 } 93 94}