Package org.astrogrid.samp.xmlrpc.internal

# Class RpcLoggingInternalServer

java.lang.Object
org.astrogrid.samp.xmlrpc.internal.InternalServer
org.astrogrid.samp.xmlrpc.internal.RpcLoggingInternalServer

All Implemented Interfaces:
  `SampXmlRpcServer`

public class RpcLoggingInternalServer extends InternalServer
InternalServer 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
`RpcLoggingInternalServer(PrintStream out)`
Constructs a server running with default characteristics on any free port.
`RpcLoggingInternalServer(HttpServer server, String path, PrintStream out)`
Constructor based on a given HTTP server.

## Method Summary

Modifier and Type
Method
Description
`protected Object`
`handleCall(SampXmlRpcHandler handler, String methodName, List paramList, HttpServer.Request request)`
Actually passes the XML-RPC method name and parameter list to one of the registered servers for processing.

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

`addHandler, getEndpoint, getFaultBytes, getHttpServer, getResultBytes, getXmlRpcResponse, removeHandler`

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

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

## Constructor Details

### RpcLoggingInternalServer

public RpcLoggingInternalServer(HttpServer server, String path, PrintStream out) throws IOException
Constructor based on a given HTTP server. It is the caller's responsibility to configure and start the HttpServer.

Parameters:
  `server` - server for processing HTTP requests
  `path` - path part of server endpoint (starts with "/");
  `out` - output stream for logging
Throws:
  `IOException`

### RpcLoggingInternalServer

public RpcLoggingInternalServer(PrintStream out) throws IOException
Constructs a server running with default characteristics on any free port. The server is started as a daemon thread.

Parameters:
  `out` - output stream for logging
Throws:
  `IOException`

## Method Details

### handleCall

protected Object handleCall(SampXmlRpcHandler handler, String methodName, List paramList, HttpServer.Request request) throws Exception
Description copied from class: `InternalServer`
Actually passes the XML-RPC method name and parameter list to one of the registered servers for processing.

Overrides:
  `handleCall` in class `InternalServer`
Parameters:
  `handler` - handler which has declared it can handle the named method
  `methodName` - XML-RPC method name
  `paramList` - list of parameters to XML-RPC call
  `request` - HTTP request from which this call originated
Throws:
  `Exception`