1 13 14 20 package org.ejbca.core.protocol; 21 22 import java.io.Serializable ; 23 24 29 30 public class ResponseStatus implements Serializable { 31 32 35 public static final ResponseStatus SUCCESS = new ResponseStatus(0); 36 37 40 public static final ResponseStatus FAILURE = new ResponseStatus(2); 41 42 45 public static final ResponseStatus PENDING = new ResponseStatus(3); 46 47 50 private final int value; 51 52 private ResponseStatus(int value) { 53 this.value = value; 54 } 55 56 60 public String getValue() { 61 return Integer.toString(value); 62 } 63 64 65 public boolean equals(Object o) { 66 if (this == o) return true; 67 if (!(o instanceof ResponseStatus)) return false; 68 69 final ResponseStatus scepResponseStatus = (ResponseStatus) o; 70 71 if (value != scepResponseStatus.value) return false; 72 73 return true; 74 } 75 76 public int hashCode() { 77 return value; 78 } 79 } 80 | Popular Tags |