KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > extend > Call


1 /*
2  * Copyright 2005 Joe Walker
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.directwebremoting.extend;
17
18 import java.lang.reflect.Method JavaDoc;
19
20 /**
21  * Call is a POJO to encapsulate the information required to make a single java
22  * call, including the result of the call (either returned data or exception).
23  * Either the Method and Parameters should be filled in to allow a call to be
24  * made or, the exception should be filled in indicating that things have gone
25  * wrong already.
26  * @author Joe Walker [joe at getahead dot ltd dot uk]
27  */

28 public class Call
29 {
30     /**
31      * @return the exception
32      */

33     public Throwable JavaDoc getException()
34     {
35         return exception;
36     }
37
38     /**
39      * @param exception the exception to set
40      */

41     public void setException(Throwable JavaDoc exception)
42     {
43         this.exception = exception;
44     }
45
46     /**
47      * @return the method
48      */

49     public Method JavaDoc getMethod()
50     {
51         return method;
52     }
53
54     /**
55      * @param method the method to set
56      */

57     public void setMethod(Method JavaDoc method)
58     {
59         this.method = method;
60     }
61
62     /**
63      * @return the parameters
64      */

65     public Object JavaDoc[] getParameters()
66     {
67         return parameters;
68     }
69
70     /**
71      * @param parameters the parameters to set
72      */

73     public void setParameters(Object JavaDoc[] parameters)
74     {
75         this.parameters = parameters;
76     }
77
78     /**
79      * @param callId The callId to set.
80      */

81     public void setCallId(String JavaDoc callId)
82     {
83         this.callId = callId;
84     }
85
86     /**
87      * @return Returns the callId.
88      */

89     public String JavaDoc getCallId()
90     {
91         return callId;
92     }
93
94     /**
95      * @param scriptName The scriptName to set.
96      */

97     public void setScriptName(String JavaDoc scriptName)
98     {
99         this.scriptName = scriptName;
100     }
101
102     /**
103      * @return Returns the scriptName.
104      */

105     public String JavaDoc getScriptName()
106     {
107         return scriptName;
108     }
109
110     /**
111      * @param methodName The methodName to set.
112      */

113     public void setMethodName(String JavaDoc methodName)
114     {
115         this.methodName = methodName;
116     }
117
118     /**
119      * @return Returns the methodName.
120      */

121     public String JavaDoc getMethodName()
122     {
123         return methodName;
124     }
125
126     private String JavaDoc callId = null;
127
128     private String JavaDoc scriptName = null;
129
130     private String JavaDoc methodName = null;
131
132     private Method JavaDoc method = null;
133
134     private Object JavaDoc[] parameters = null;
135
136     private Throwable JavaDoc exception = null;
137 }
138
Popular Tags