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 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