Package org.astrogrid.samp.xmlrpc.apache
Class ApacheServer
- java.lang.Object
-
- org.astrogrid.samp.xmlrpc.apache.ApacheServer
-
- All Implemented Interfaces:
SampXmlRpcServer
public class ApacheServer extends java.lang.Object implements SampXmlRpcServer
SampXmlRpcServer implementation based on Apache XML-RPC library.- Since:
- 22 Aug 2008
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description ApacheServer()Constructs a new server starting up a new WebServer object.ApacheServer(WebServer webServer, int port)Constructs a new server based on a given WebServer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHandler(SampXmlRpcHandler handler)Adds a handler which can service certain XML-RPC methods.java.net.URLgetEndpoint()Returns the server's endpoint.voidremoveHandler(SampXmlRpcHandler handler)Removes a previously-added handler.
-
-
-
Constructor Detail
-
ApacheServer
public ApacheServer(WebServer webServer, int port)Constructs a new server based on a given WebServer object. Responsibility forstarting the WebServer and performing any other required configuration lies with the caller.- Parameters:
webServer- apache xmlrpc webserver objectport- port number on which the server is running
-
ApacheServer
public ApacheServer() throws java.io.IOExceptionConstructs a new server starting up a new WebServer object. The server runs in a daemon thread.- Throws:
java.io.IOException
-
-
Method Detail
-
getEndpoint
public java.net.URL getEndpoint()
Description copied from interface:SampXmlRpcServerReturns the server's endpoint.- Specified by:
getEndpointin interfaceSampXmlRpcServer- Returns:
- URL to which XML-RPC requests are POSTed
-
addHandler
public void addHandler(SampXmlRpcHandler handler)
Description copied from interface:SampXmlRpcServerAdds a handler which can service certain XML-RPC methods.- Specified by:
addHandlerin interfaceSampXmlRpcServer- Parameters:
handler- handler to add
-
removeHandler
public void removeHandler(SampXmlRpcHandler handler)
Description copied from interface:SampXmlRpcServerRemoves a previously-added handler.- Specified by:
removeHandlerin interfaceSampXmlRpcServer- Parameters:
handler- handler to remove
-
-