Package org.apache.xmlrpc.client
Class XmlRpcClientRequestImpl
- java.lang.Object
-
- org.apache.xmlrpc.client.XmlRpcClientRequestImpl
-
- All Implemented Interfaces:
XmlRpcRequest
public class XmlRpcClientRequestImpl extends java.lang.Object implements XmlRpcRequest
Default implementation ofXmlRpcRequest
.
-
-
Field Summary
Fields Modifier and Type Field Description private XmlRpcRequestConfig
config
private java.lang.String
methodName
private java.lang.Object[]
params
private static java.lang.Object[]
ZERO_PARAMS
-
Constructor Summary
Constructors Constructor Description XmlRpcClientRequestImpl(XmlRpcRequestConfig pConfig, java.lang.String pMethodName, java.lang.Object[] pParams)
Creates a new instance.XmlRpcClientRequestImpl(XmlRpcRequestConfig pConfig, java.lang.String pMethodName, java.util.List pParams)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlRpcRequestConfig
getConfig()
Returns the request configuration.java.lang.String
getMethodName()
Returns the requests method name.java.lang.Object
getParameter(int pIndex)
Returns the parameter with indexpIndex
.int
getParameterCount()
Returns the number of parameters.
-
-
-
Field Detail
-
ZERO_PARAMS
private static final java.lang.Object[] ZERO_PARAMS
-
config
private final XmlRpcRequestConfig config
-
methodName
private final java.lang.String methodName
-
params
private final java.lang.Object[] params
-
-
Constructor Detail
-
XmlRpcClientRequestImpl
public XmlRpcClientRequestImpl(XmlRpcRequestConfig pConfig, java.lang.String pMethodName, java.lang.Object[] pParams)
Creates a new instance.- Parameters:
pConfig
- The request configuration.pMethodName
- The method name being performed.pParams
- The parameters.- Throws:
java.lang.NullPointerException
- One of the parameters is null.
-
XmlRpcClientRequestImpl
public XmlRpcClientRequestImpl(XmlRpcRequestConfig pConfig, java.lang.String pMethodName, java.util.List pParams)
Creates a new instance.- Parameters:
pConfig
- The request configuration.pMethodName
- The method name being performed.pParams
- The parameters.- Throws:
java.lang.NullPointerException
- The method name or the parameters are null.
-
-
Method Detail
-
getMethodName
public java.lang.String getMethodName()
Description copied from interface:XmlRpcRequest
Returns the requests method name.- Specified by:
getMethodName
in interfaceXmlRpcRequest
- Returns:
- Name of the method being invoked.
-
getParameterCount
public int getParameterCount()
Description copied from interface:XmlRpcRequest
Returns the number of parameters.- Specified by:
getParameterCount
in interfaceXmlRpcRequest
- Returns:
- Number of parameters.
-
getParameter
public java.lang.Object getParameter(int pIndex)
Description copied from interface:XmlRpcRequest
Returns the parameter with indexpIndex
.- Specified by:
getParameter
in interfaceXmlRpcRequest
- Parameters:
pIndex
- Number between 0 andXmlRpcRequest.getParameterCount()
-1.- Returns:
- Parameter being sent to the server.
-
getConfig
public XmlRpcRequestConfig getConfig()
Description copied from interface:XmlRpcRequest
Returns the request configuration.- Specified by:
getConfig
in interfaceXmlRpcRequest
- Returns:
- The request configuration.
-
-