本文整理了Java中org.apache.xmlrpc.webserver.WebServer.start()
方法的一些代码示例,展示了WebServer.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServer.start()
方法的具体详情如下:
包路径:org.apache.xmlrpc.webserver.WebServer
类名称:WebServer
方法名:start
[英]Spawns a new thread which binds this server to the port it's configured to accept connections on.
[中]生成一个新线程,将此服务器绑定到其配置为接受连接的端口。
代码示例来源:origin: org.nuiton.topia/topia-soa
/**
* lance le serveur
*/
public void launch() {
if (!alreadyLaunched) {
try {
webServer.start();
logger.info("XML-RPC server running...");
} catch (IOException e) {
logger.debug("I/O erreur while launching xml-rpc web serveur",
e);
}
alreadyLaunched = true;
}
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-entity-similarity
public static void main(String[] args) {
if (args.length != 1)
System.err.println("Usage: ECServer port");
int port = (new Integer(args[0])).intValue();
try {
System.out.println("Attempting to start XML-RPC Server...");
WebServer server = new WebServer(port);
XmlRpcServer xmlRpcServer = server.getXmlRpcServer();
PropertyHandlerMapping phm = new PropertyHandlerMapping();
phm.addHandler("EntityComparison", EntityComparison.class);
xmlRpcServer.setHandlerMapping(phm);
XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl)xmlRpcServer.getConfig();
serverConfig.setEnabledForExtensions(true);
serverConfig.setContentLengthOptional(false);
server.start();
System.out.println("Started successfully.");
System.out.println("Accepting requests. (Halt program to stop.)");
}
catch (Exception exception) {
System.err.println("ECServer: " + exception);
}
}
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-wnsim
serverConfig.setContentLengthOptional(false);
server.start();
代码示例来源:origin: edu.illinois.cs.cogcomp/DatalessClassification
public static void server(String indexDirectory, int port)
throws IOException, XmlRpcException {
log.info(
"Starting descartes server at port {}, with index directory {}",
Integer.valueOf(port), indexDirectory);
DescartesServer.indexDirectory = indexDirectory;
WebServer webServer = new WebServer(port);
XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();
PropertyHandlerMapping phm = new PropertyHandlerMapping();
phm.addHandler("DescartesServer", DescartesServer.class);
xmlRpcServer.setHandlerMapping(phm);
XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) xmlRpcServer
.getConfig();
serverConfig.setEnabledForExtensions(true);
serverConfig.setContentLengthOptional(false);
webServer.start();
log.info("Descartes is ready!");
}
代码示例来源:origin: rosjava/rosjava_core
serverConfig.setContentLengthOptional(false);
try {
server.start();
} catch (IOException e) {
throw new RosRuntimeException(e);
内容来源于网络,如有侵权,请联系作者删除!