org.eclipse.emf.emfstore.internal.server.connection.xmlrpc
Class XmlRpcBuiltinWebServer

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.connection.xmlrpc.XmlRpcBuiltinWebServer
All Implemented Interfaces:
ESXmlRpcWebServerProvider

public final class XmlRpcBuiltinWebServer
extends Object
implements ESXmlRpcWebServerProvider

XML-RPC built-in web server for XML RPC connections.

Author:
wesendon

Constructor Summary
XmlRpcBuiltinWebServer()
          Constructor.
 
Method Summary
 void addHandler(String handlerName, Class<?> clazz)
          Adds a handler to the webserver.
 int getPort()
          Returns the port the server is listening to.
 void initServer()
          Starts the server.
 boolean removeHandler(String handlerName)
          Removes a handler from the Webserver.
 void setPort(int port)
          Set the port for the server, must be called before any other method can be called.
 void stopServer()
          Stops the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcBuiltinWebServer

public XmlRpcBuiltinWebServer()
Constructor.

Method Detail

initServer

public void initServer()
                throws ESServerInitException
Starts the server.

Specified by:
initServer in interface ESXmlRpcWebServerProvider
Throws:
ESServerInitException - in case of failure

addHandler

public void addHandler(String handlerName,
                       Class<?> clazz)
                throws ESServerInitException
Adds a handler to the webserver.

Specified by:
addHandler in interface ESXmlRpcWebServerProvider
Parameters:
handlerName - handler name
clazz - class of server interface
Throws:
ESServerInitException - in case of failure

removeHandler

public boolean removeHandler(String handlerName)
Removes a handler from the Webserver.

Specified by:
removeHandler in interface ESXmlRpcWebServerProvider
Parameters:
handlerName - the handler's name
Returns:
true, if other handler still available

stopServer

public void stopServer()
Stops the server.

Specified by:
stopServer in interface ESXmlRpcWebServerProvider

setPort

public void setPort(int port)
Set the port for the server, must be called before any other method can be called.

Specified by:
setPort in interface ESXmlRpcWebServerProvider
Parameters:
port - http(s) port where server will answer
See Also:
ESXmlRpcWebServerProvider.setPort(int)

getPort

public int getPort()
Returns the port the server is listening to.

Specified by:
getPort in interface ESXmlRpcWebServerProvider
Returns:
port server listens to
See Also:
ESXmlRpcWebServerProvider.getPort()


Copyright © 2015. All Rights Reserved.