Package org.astrogrid.samp.xmlrpc.internal

# Class XmlRpcCall

java.lang.Object
org.astrogrid.samp.xmlrpc.internal.XmlRpcCall

public class XmlRpcCall extends Object
Represents the content of an XML-RPC methodCall element.

Since:
  11 Mar 2016
Author:
  Mark Taylor
See Also:
  - XML-RPC

## Constructor Summary

Constructors
Constructor
Description
`XmlRpcCall(String methodName, List params)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static XmlRpcCall`
`createCall(Document callDoc)`
Constructs an XmlRpcCall instance from a document with a methodCall element at top level.
`String`
`getMethodName()`
Returns the method name.
`List`
`getParams()`
Returns the parameter list.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### XmlRpcCall

public XmlRpcCall(String methodName, List params)
Constructor.

Parameters:
  `methodName` - content of `methodName` element
  `params` - SAMP-friendly list of parameters as contained in the `params` element

## Method Details

### getMethodName

public String getMethodName()
Returns the method name.

Returns:
  content of `methodName` element

### getParams

public List getParams()
Returns the parameter list.

Returns:
  SAMP-friendly list of parameter values from `params` element

### createCall

public static XmlRpcCall createCall(Document callDoc) throws org.astrogrid.samp.xmlrpc.internal.XmlRpcFormatException
Constructs an XmlRpcCall instance from a document with a methodCall element at top level.

Parameters:
  `callDoc` - node whose child is an XML-RPC `methodCall` element
Returns:
  call instance
Throws:
  `org.astrogrid.samp.xmlrpc.internal.XmlRpcFormatException` - if the document does not have the expected form