Class XmlLoggingInternalServer
java.lang.Object
org.astrogrid.samp.xmlrpc.internal.InternalServer
org.astrogrid.samp.xmlrpc.internal.XmlLoggingInternalServer
- All Implemented Interfaces:
SampXmlRpcServer
Freestanding InternalServer implementation which logs all incoming
and outgoing HTTP data.
- Since:
- 2 Dec 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a server running with default characteristics on any free port.XmlLoggingInternalServer
(HttpServer server, String path, PrintStream out) Constructor based on a given HTTP server. -
Method Summary
Modifier and TypeMethodDescriptionprotected HttpServer.Response
getXmlRpcResponse
(HttpServer.Request request) Returns the HTTP response object given an incoming XML-RPC POST request.Methods inherited from class org.astrogrid.samp.xmlrpc.internal.InternalServer
addHandler, getEndpoint, getFaultBytes, getHttpServer, getResultBytes, handleCall, removeHandler
-
Constructor Details
-
XmlLoggingInternalServer
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 loggging- Throws:
IOException
-
XmlLoggingInternalServer
Constructs a server running with default characteristics on any free port. The server is started as a daemon thread.- Parameters:
out
- output stream for loggging- Throws:
IOException
-
-
Method Details
-
getXmlRpcResponse
Description copied from class:InternalServer
Returns the HTTP response object given an incoming XML-RPC POST request. Any error should be handled by returning a fault-type methodResponse element rather than by throwing an exception.- Overrides:
getXmlRpcResponse
in classInternalServer
- Parameters:
request
- POSTed HTTP request- Returns:
- XML-RPC response (possibly fault)
-