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
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.PrintStream
out_
-
Constructor Summary
Constructors Constructor Description RpcLoggingInternalServer(java.io.PrintStream out)
Constructs a server running with default characteristics on any free port.RpcLoggingInternalServer(HttpServer server, java.lang.String path, java.io.PrintStream out)
Constructor based on a given HTTP server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
handleCall(SampXmlRpcHandler handler, java.lang.String methodName, java.util.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, getHttpServer, getXmlRpcResponse, removeHandler
-
-
-
-
Constructor Detail
-
RpcLoggingInternalServer
public RpcLoggingInternalServer(HttpServer server, java.lang.String path, java.io.PrintStream out) throws java.io.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 requestspath
- path part of server endpoint (starts with "/");out
- output stream for logging- Throws:
java.io.IOException
-
RpcLoggingInternalServer
public RpcLoggingInternalServer(java.io.PrintStream out) throws java.io.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:
java.io.IOException
-
-
Method Detail
-
handleCall
protected java.lang.Object handleCall(SampXmlRpcHandler handler, java.lang.String methodName, java.util.List paramList, HttpServer.Request request) throws java.lang.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 classInternalServer
- Parameters:
handler
- handler which has declared it can handle the named methodmethodName
- XML-RPC method nameparamList
- list of parameters to XML-RPC callrequest
- HTTP request from which this call originated- Throws:
java.lang.Exception
-
-