1 20 package org.apache.mina.example.sumup.message; 21 22 28 public class ResultMessage extends AbstractMessage { 29 private static final long serialVersionUID = 7371210248110219946L; 30 31 private boolean ok; 32 33 private int value; 34 35 public ResultMessage() { 36 } 37 38 public boolean isOk() { 39 return ok; 40 } 41 42 public void setOk(boolean ok) { 43 this.ok = ok; 44 } 45 46 public int getValue() { 47 return value; 48 } 49 50 public void setValue(int value) { 51 this.value = value; 52 } 53 54 public String toString() { 55 if (ok) { 56 return getSequence() + ":RESULT(" + value + ')'; 57 } else { 58 return getSequence() + ":RESULT(ERROR)"; 59 } 60 } 61 } | Popular Tags |