Debian Codegraph @

src/java/org/astrogrid/samp/xmlrpc/internal/XmlLoggingInternalServerFactory.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 incoming
9 * and outgoing HTTP data.
10 *
11 * @author Mark Taylor
12 * @since 2 Dec 2008
13 */
14 public class XmlLoggingInternalServerFactory
15 implements SampXmlRpcServerFactory {
16
17 private XmlLoggingInternalServer server_;
18
19 public synchronized SampXmlRpcServer getServer() throws IOException {
20 if ( server_ == null ) {
21 server_ = new XmlLoggingInternalServer( System.out );
22 }
23 return server_;
24 }
25 }