KickJava   Java API By Example, From Geeks To Geeks.

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


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.Serializable JavaDoc;
12 import java.util.Map JavaDoc;
13
14 /**
15  * InvocationRequest is passed to ServerInvocationHandler which encapsulates the
16  * unmarshalled method invocation parameters from the ServerInvoker.
17  *
18  * @author <a HREF="mailto:jhaynie@vocalocity.net">Jeff Haynie</a>
19  * @version $Revision: 1.2 $
20  */

21 //TODO: Need to remove Serializable if not going to pass InvocationRequest as the callback object -TME
22
public class InvocationRequest implements Serializable JavaDoc
23 {
24    static final long serialVersionUID = -6719842238864057289L;
25
26    private String JavaDoc sessionId;
27
28    private String JavaDoc subsystem;
29    private Object JavaDoc arg;
30    private Map JavaDoc requestPayload;
31    private Map JavaDoc returnPayload;
32    private InvokerLocator locator;
33
34    public InvocationRequest(String JavaDoc sessionId, String JavaDoc subsystem, Object JavaDoc arg, Map JavaDoc requestPayload, Map JavaDoc returnPayload, InvokerLocator locator)
35    {
36       this.sessionId = sessionId;
37       this.subsystem = subsystem;
38       this.arg = arg;
39       this.requestPayload = requestPayload;
40       this.returnPayload = returnPayload;
41       this.locator = locator;
42    }
43
44    protected InvocationRequest(Object JavaDoc arg)
45    {
46       this.arg = arg;
47    }
48
49    public InvokerLocator getLocator()
50    {
51       return locator;
52    }
53
54    public void setLocator(InvokerLocator locator)
55    {
56       this.locator = locator;
57    }
58
59    public String JavaDoc getSubsystem()
60    {
61       return subsystem;
62    }
63
64    public void setSubsystem(String JavaDoc subsystem)
65    {
66       this.subsystem = subsystem;
67    }
68
69    public String JavaDoc getSessionId()
70    {
71       return sessionId;
72    }
73
74    public void setSessionId(String JavaDoc sessionId)
75    {
76       this.sessionId = sessionId;
77    }
78
79    public Object JavaDoc getParameter()
80    {
81       return arg;
82    }
83
84    public void setParameter(Object JavaDoc arg)
85    {
86       this.arg = arg;
87    }
88
89    public Map JavaDoc getRequestPayload()
90    {
91       return requestPayload;
92    }
93
94    public void setRequestPayload(Map JavaDoc requestPayload)
95    {
96       this.requestPayload = requestPayload;
97    }
98
99    public Map JavaDoc getReturnPayload()
100    {
101       return returnPayload;
102    }
103
104    public void setReturnPayload(Map JavaDoc returnPayload)
105    {
106       this.returnPayload = returnPayload;
107    }
108 }
109
Popular Tags