KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xmlrpc > XmlRpcRequest


1 /*
2  * Copyright 1999,2005 The Apache Software Foundation.
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
17
18 package org.apache.xmlrpc;
19
20 import java.util.Vector JavaDoc;
21
22 /**
23  * Default implementation of an XML-RPC request for both client and server.
24  *
25  * @author <a HREF="mailto:andrew@kungfoocoder.org">Andrew Evers</a>
26  * @version $Id: XmlRpcRequest.java,v 1.5 2005/04/22 10:25:57 hgomez Exp $
27  * @since 1.2
28  */

29 public class XmlRpcRequest
30 implements XmlRpcServerRequest, XmlRpcClientRequest
31 {
32     protected final String JavaDoc methodName;
33     protected final Vector JavaDoc parameters;
34
35     public XmlRpcRequest(String JavaDoc methodName, Vector JavaDoc parameters)
36     {
37         this.parameters = parameters;
38         this.methodName = methodName;
39     }
40
41     public int getParameterCount()
42     {
43         return parameters.size();
44     }
45     
46     public Vector JavaDoc getParameters()
47     {
48         return parameters;
49     }
50
51     public Object JavaDoc getParameter(int index)
52     {
53         return parameters.elementAt(index);
54     }
55
56     public String JavaDoc getMethodName()
57     {
58         return methodName;
59     }
60 }
61
Popular Tags