Debian Codegraph @

src/java/org/astrogrid/samp/xmlrpc/internal/RpcLoggingInternalServerFactory.java

raw
1 package org.astrogrid.samp.xmlrpc.internal;
2
3 import java.io.IOException;
4 import org.astrogrid.samp.xmlrpc.SampXmlRpcServer;
5 import org.astrogrid.samp.xmlrpc.SampXmlRpcServerFactory;
6
7 /**
8 * Freestanding ServerFactory implementation which logs all XML-RPC
9 * calls/responses to standard output.
10 *
11 * @author Mark Taylor
12 * @since 2 Dec 2008
13 */
14 public class RpcLoggingInternalServerFactory
15 implements SampXmlRpcServerFactory {
16 private RpcLoggingInternalServer server_;
17
18 public synchronized SampXmlRpcServer getServer() throws IOException {
19 if ( server_ == null ) {
20 server_ = new RpcLoggingInternalServer( System.out );
21 }
22 return server_;
23 }
24 }