1 /**
2 *
3 */
4 package org.sourceforge.jemm.comm.shared;
5
6 /**
7 * @author Rory Graves
8 *
9 */
10 public class RPCCallRespMessage extends Message {
11 private static final long serialVersionUID = 1L;
12
13 /** Whether the call was a normal return or an exception. */
14 private final boolean callSuccess;
15
16 /** Returned value, or thrown exception. */
17 private final Object returnValue;
18
19 /**
20 * Create an RPCCallRespMessage for the given caller thread, with the returned value or exception
21 * @param threadId The calling threadId.
22 * @param normalReturn If true, the 'returnValue' is the method return value, false it is a thrown exception.
23 * @param returnValue The returned value or exception.
24 */
25 public RPCCallRespMessage(String threadId,boolean normalReturn,Object returnValue) {
26 super(threadId);
27 callSuccess = normalReturn;
28 this.returnValue = returnValue;
29 }
30
31 public boolean isCallSuccess() {
32 return callSuccess;
33 }
34
35 public Object getReturnValue() {
36 return returnValue;
37 }
38 }