1 7 8 package org.ietf.jgss; 9 10 38 public class MessageProp { 39 40 private boolean privacyState; 41 private int qop; 42 private boolean dupToken; 43 private boolean oldToken; 44 private boolean unseqToken; 45 private boolean gapToken; 46 private int minorStatus; 47 private String minorString; 48 49 55 public MessageProp(boolean privState) { 56 this(0, privState); 57 } 58 59 65 public MessageProp(int qop, boolean privState) { 66 this.qop = qop; 67 this.privacyState = privState; 68 resetStatusValues(); 69 } 70 71 77 public int getQOP() { 78 return qop; 79 } 80 81 88 public boolean getPrivacy() { 89 90 return (privacyState); 91 } 92 93 99 public void setQOP(int qop) { 100 this.qop = qop; 101 } 102 103 104 111 public void setPrivacy(boolean privState) { 112 113 this.privacyState = privState; 114 } 115 116 117 122 public boolean isDuplicateToken() { 123 return dupToken; 124 } 125 126 133 public boolean isOldToken() { 134 return oldToken; 135 } 136 137 142 public boolean isUnseqToken() { 143 return unseqToken; 144 } 145 146 153 public boolean isGapToken() { 154 return gapToken; 155 } 156 157 163 public int getMinorStatus(){ 164 return minorStatus; 165 } 166 167 174 public String getMinorString(){ 175 return minorString; 176 } 177 178 196 public void setSupplementaryStates(boolean duplicate, 197 boolean old, boolean unseq, boolean gap, 198 int minorStatus, String minorString) { 199 this.dupToken = duplicate; 200 this.oldToken = old; 201 this.unseqToken = unseq; 202 this.gapToken = gap; 203 this.minorStatus = minorStatus; 204 this.minorString = minorString; 205 } 206 207 210 private void resetStatusValues() { 211 dupToken = false; 212 oldToken = false; 213 unseqToken = false; 214 gapToken = false; 215 minorStatus = 0; 216 minorString = null; 217 } 218 } 219 | Popular Tags |