KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > InvocationResponse


1 /***************************************
2  * *
3  * JBoss: The OpenSource J2EE WebOS *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  ***************************************/

9 package org.jboss.remoting;
10
11 import java.io.IOException JavaDoc;
12 import java.io.Serializable JavaDoc;
13 import java.util.Map JavaDoc;
14
15
16 /**
17  * InvocationResponse is a return object from a call to a remote Server Invoker.
18  * The InvocationResponse may contain either an Exception or a result value (which may be
19  * null in the case the user returns null)
20  *
21  * @author <a HREF="mailto:tom.elrod@jboss.com">Tom Elrod</a>
22  * @version $Revision: 1.1.1.1 $
23  */

24 public class InvocationResponse implements Serializable JavaDoc
25 {
26    static final long serialVersionUID = 1324503813652865685L;
27
28    private final String JavaDoc sessionId;
29    private final boolean isException;
30    private final Object JavaDoc result;
31    private Map JavaDoc payload;
32
33    public InvocationResponse(String JavaDoc sessionId, Object JavaDoc result, boolean isException, Map JavaDoc payload)
34          throws IOException JavaDoc
35    {
36       this.sessionId = sessionId;
37       this.isException = isException;
38       this.result = result;
39       this.payload = payload;
40    }
41
42    public String JavaDoc getSessionId()
43    {
44       return sessionId;
45    }
46
47    public Map JavaDoc getPayload()
48    {
49       return payload;
50    }
51
52    public boolean isException()
53    {
54       return isException;
55    }
56
57    public Object JavaDoc getResult()
58    {
59       return result;
60    }
61 }
62
Popular Tags