KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > stream > StreamCallPayload


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.remoting.stream;
8
9 import java.io.Serializable JavaDoc;
10
11 /**
12  * The StreamCallPayload is used when making calls from the server
13  * to the client to read from the original input stream.
14  * It will contain the method name being called from the server side (i.e. available(), read(), etc.)
15  * along with any parameters for the respective method.
16  *
17  * @author <a HREF="mailto:tom.elrod@jboss.com">Tom Elrod</a>
18  */

19 public class StreamCallPayload implements Serializable JavaDoc
20 {
21    private String JavaDoc method = null;
22    private Object JavaDoc[] paramArray = null;
23
24    /**
25     * Constructor which requires the name of the method to call on the
26     * the original stream.
27     *
28     * @param methodCallName
29     */

30    public StreamCallPayload(String JavaDoc methodCallName)
31    {
32       this.method = methodCallName;
33    }
34
35    /**
36     * Gets the method to call on the original stream.
37     *
38     * @return
39     */

40    public String JavaDoc getMethod()
41    {
42       return method;
43    }
44
45    /**
46     * Sets the params for the method to call on the
47     * stream. For example, the Integer for markSupported(int supported).
48     *
49     * @param params
50     */

51    public void setParams(Object JavaDoc[] params)
52    {
53       this.paramArray = params;
54    }
55
56    /**
57     * Gets the params for the method to call on the stream.
58     *
59     * @return
60     */

61    public Object JavaDoc[] getParams()
62    {
63       return this.paramArray;
64    }
65 }
Popular Tags