Package org.astrogrid.samp.xmlrpc.apache
Class ApacheServer
java.lang.Object
org.astrogrid.samp.xmlrpc.apache.ApacheServer
- All Implemented Interfaces:
SampXmlRpcServer
SampXmlRpcServer implementation based on Apache XML-RPC library.
- Since:
- 22 Aug 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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
Modifier and TypeMethodDescriptionvoid
addHandler
(SampXmlRpcHandler handler) Adds a handler which can service certain XML-RPC methods.Returns the server's endpoint.void
removeHandler
(SampXmlRpcHandler handler) Removes a previously-added handler.
-
Constructor Details
-
ApacheServer
public ApacheServer(WebServer webServer, int port) Constructs a new server based on a given WebServer object. Responsibility forstart
ing 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
Constructs a new server starting up a new WebServer object. The server runs in a daemon thread.- Throws:
IOException
-
-
Method Details
-
getEndpoint
Description copied from interface:SampXmlRpcServer
Returns the server's endpoint.- Specified by:
getEndpoint
in interfaceSampXmlRpcServer
- Returns:
- URL to which XML-RPC requests are POSTed
-
addHandler
Description copied from interface:SampXmlRpcServer
Adds a handler which can service certain XML-RPC methods.- Specified by:
addHandler
in interfaceSampXmlRpcServer
- Parameters:
handler
- handler to add
-
removeHandler
Description copied from interface:SampXmlRpcServer
Removes a previously-added handler.- Specified by:
removeHandler
in interfaceSampXmlRpcServer
- Parameters:
handler
- handler to remove
-