1 64 65 package com.jcorporate.expresso.services.asyncprocess; 66 67 75 public class DefaultProcessResult implements AsyncProcessResult { 76 int statusCode; 77 78 81 protected Throwable exception; 82 83 86 protected Object result; 87 88 89 92 protected AsyncProcess originalProcess; 93 94 public DefaultProcessResult() { 95 } 96 97 102 public int getStatusCode() { 103 return statusCode; 104 } 105 106 112 public Throwable getException() { 113 return exception; 114 } 115 116 121 public Object getResult() { 122 return result; 123 } 124 125 public void setException(Throwable exception) { 126 this.exception = exception; 127 } 128 129 public void setResult(Object result) { 130 this.result = result; 131 } 132 133 public void setStatusCode(int statusCode) { 134 this.statusCode = statusCode; 135 } 136 137 142 public Object getStatus() { 143 if (originalProcess != null) { 144 return originalProcess.getStatus(); 145 } 146 return null; 147 } 148 149 150 155 public AsyncProcess getOriginalProcess() { 156 return originalProcess; 157 } 158 159 public void setOriginalProcess(AsyncProcess process) { 160 originalProcess = process; 161 } 162 } | Popular Tags |