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

      • out_

        private final java.io.PrintStream out_
    • 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 requests
        path - 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 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:
        java.lang.Exception