001: /*
002: * Copyright 2005 Joe Walker
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.directwebremoting.extend;
017:
018: import java.lang.reflect.Method;
019:
020: /**
021: * Call is a POJO to encapsulate the information required to make a single java
022: * call, including the result of the call (either returned data or exception).
023: * Either the Method and Parameters should be filled in to allow a call to be
024: * made or, the exception should be filled in indicating that things have gone
025: * wrong already.
026: * @author Joe Walker [joe at getahead dot ltd dot uk]
027: */
028: public class Call {
029: /**
030: * @return the exception
031: */
032: public Throwable getException() {
033: return exception;
034: }
035:
036: /**
037: * @param exception the exception to set
038: */
039: public void setException(Throwable exception) {
040: this .exception = exception;
041: }
042:
043: /**
044: * @return the method
045: */
046: public Method getMethod() {
047: return method;
048: }
049:
050: /**
051: * @param method the method to set
052: */
053: public void setMethod(Method method) {
054: this .method = method;
055: }
056:
057: /**
058: * @return the parameters
059: */
060: public Object[] getParameters() {
061: return parameters;
062: }
063:
064: /**
065: * @param parameters the parameters to set
066: */
067: public void setParameters(Object[] parameters) {
068: this .parameters = parameters;
069: }
070:
071: /**
072: * @param callId The callId to set.
073: */
074: public void setCallId(String callId) {
075: this .callId = callId;
076: }
077:
078: /**
079: * @return Returns the callId.
080: */
081: public String getCallId() {
082: return callId;
083: }
084:
085: /**
086: * @param scriptName The scriptName to set.
087: */
088: public void setScriptName(String scriptName) {
089: this .scriptName = scriptName;
090: }
091:
092: /**
093: * @return Returns the scriptName.
094: */
095: public String getScriptName() {
096: return scriptName;
097: }
098:
099: /**
100: * @param methodName The methodName to set.
101: */
102: public void setMethodName(String methodName) {
103: this .methodName = methodName;
104: }
105:
106: /**
107: * @return Returns the methodName.
108: */
109: public String getMethodName() {
110: return methodName;
111: }
112:
113: private String callId = null;
114:
115: private String scriptName = null;
116:
117: private String methodName = null;
118:
119: private Method method = null;
120:
121: private Object[] parameters = null;
122:
123: private Throwable exception = null;
124: }
|