1 3 package org.jgroups.util; 4 5 import org.jgroups.Address; 6 7 8 11 public class Rsp 12 { 13 14 boolean received=false; 15 16 boolean suspected=false; 17 18 Address sender=null; 19 20 Object retval=null; 21 22 23 Rsp(Address sender) 24 { 25 this.sender=sender; 26 } 27 28 Rsp(Address sender, boolean suspected) 29 { 30 this.sender=sender; 31 this.suspected=suspected; 32 } 33 34 Rsp(Address sender, Object retval) 35 { 36 this.sender=sender; 37 this.retval=retval; 38 received=true; 39 } 40 41 public Object getValue() 42 { 43 return retval; 44 } 45 46 public Address getSender() 47 { 48 return sender; 49 } 50 51 public boolean wasReceived() 52 { 53 return received; 54 } 55 56 public boolean wasSuspected() 57 { 58 return suspected; 59 } 60 61 public String toString() 62 { 63 return "sender=" + sender + ", retval=" + retval + ", received=" + 64 received + ", suspected=" + suspected; 65 } 66 } 67 68 | Popular Tags |