1 15 16 package com.jdon.bussinessproxy.remote.http; 17 18 19 import java.io.Serializable ; 20 21 25 public class HttpResponse implements Serializable { 26 private Throwable throwable; 27 private Object result; 28 29 public HttpResponse(Throwable throwable) { 30 this.throwable = throwable; 31 } 32 33 public HttpResponse(Object result) { 34 this.result = result; 35 } 36 37 public Throwable getThrowable() { 38 return throwable; 39 } 40 41 public void setThrowable(Throwable throwable) { 42 this.throwable = throwable; 43 } 44 45 public Object getResult() { 46 return result; 47 } 48 49 public void setResult(Object result) { 50 this.result = result; 51 } 52 53 public boolean isExceptionThrown() { 54 if (throwable != null) return true; 55 return false; 56 } 57 } 58 | Popular Tags |