1 package org.lsst.ccs.command.remote;
2
3 import java.io.Serializable;
4 import org.lsst.ccs.command.CommandInvocationException;
5
6
7
8
9
10
11
12 public class CommandResponse implements Serializable {
13 private Serializable result;
14 private CommandInvocationException exception;
15
16 public CommandResponse(Serializable result) {
17 this.result = result;
18 }
19
20 public CommandResponse(CommandInvocationException exception) {
21 this.exception = exception;
22 }
23
24 public Object getResult() throws CommandInvocationException {
25 if (exception != null) throw exception;
26 return result;
27 }
28 }