Package org.astrogrid.samp.xmlrpc.internal

# Class XmlLoggingInternalClient

java.lang.Object
org.astrogrid.samp.xmlrpc.internal.InternalClient
org.astrogrid.samp.xmlrpc.internal.XmlLoggingInternalClient

All Implemented Interfaces:
  `SampXmlRpcClient`

public class XmlLoggingInternalClient extends InternalClient
InternalClient subclass which additionally logs all XML-RPC calls/responses to an output stream.

Since:
  2 Dec 2008
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`XmlLoggingInternalClient(URL endpoint, PrintStream out)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected Object`
`deserializeResponse(InputStream in)`
Deserializes an XML-RPC `methodResponse` document to a Java object.
`protected byte[]`
`serializeCall(String method, List paramList)`
Generates the XML `methodCall` document corresponding to an XML-RPC method call.

### Methods inherited from class org.astrogrid.samp.xmlrpc.internal.InternalClient

`callAndForget, callAndWait`

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

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

## Constructor Details

### XmlLoggingInternalClient

public XmlLoggingInternalClient(URL endpoint, PrintStream out)
Constructor.

Parameters:
  `endpoint` - endpoint
  `out` - output stream for logging

## Method Details

### serializeCall

protected byte[] serializeCall(String method, List paramList) throws IOException
Description copied from class: `InternalClient`
Generates the XML `methodCall` document corresponding to an XML-RPC method call.

Overrides:
  `serializeCall` in class `InternalClient`
Parameters:
  `method` - methodName string
  `paramList` - list of XML-RPC parameters
Returns:
  XML document as byte array
Throws:
  `IOException`

### deserializeResponse

protected Object deserializeResponse(InputStream in) throws IOException
Description copied from class: `InternalClient`
Deserializes an XML-RPC `methodResponse` document to a Java object.

Overrides:
  `deserializeResponse` in class `InternalClient`
Parameters:
  `in` - input stream containing response document
Throws:
  `IOException`