• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java XmlRpcHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.xmlrpc.XmlRpcHandler的典型用法代码示例。如果您正苦于以下问题:Java XmlRpcHandler类的具体用法?Java XmlRpcHandler怎么用?Java XmlRpcHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XmlRpcHandler类属于org.apache.xmlrpc包,在下文中一共展示了XmlRpcHandler类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: PyUnitServer

import org.apache.xmlrpc.XmlRpcHandler; //导入依赖的package包/类
/**
 * As we need to be able to relaunch, we store the configuration and launch here (although the relaunch won't be
 * actually done in this class, this is the place to get information on it).
 * 
 * @param config used to get the configuration of the launch.
 * @param launch the actual launch
 * @throws IOException
 */
public PyUnitServer(PythonRunnerConfig config, ILaunch launch) throws IOException {
    initializeDispatches();
    port = SocketUtil.findUnusedLocalPorts(1)[0];
    this.webServer = new WebServer(port);
    XmlRpcServer serverToHandleRawInput = this.webServer.getXmlRpcServer();
    serverToHandleRawInput.setHandlerMapping(new XmlRpcHandlerMapping() {

        @Override
        public XmlRpcHandler getHandler(String handlerName) throws XmlRpcNoSuchHandlerException, XmlRpcException {
            return handler;
        }
    });

    this.webServer.start();

    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    launchManager.addLaunchListener(this.launchListener);
    this.launch = launch;
    this.configuration = config.getLaunchConfiguration();
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:29,代码来源:PyUnitServer.java


示例2: getHandler

import org.apache.xmlrpc.XmlRpcHandler; //导入依赖的package包/类
@Override
public XmlRpcHandler getHandler(String method) throws XmlRpcNoSuchHandlerException, XmlRpcException {
    ModelService model = null;
    try {
        model = dispatcher.getDispatchContext().getModelService(method);
    } catch (GenericServiceException e) {
        Debug.logWarning(e, module);
    }
    if (model == null) {
        throw new XmlRpcNoSuchHandlerException("No such service [" + method + "]");
    }
    return this;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:14,代码来源:XmlRpcEventHandler.java


示例3: startServer

import org.apache.xmlrpc.XmlRpcHandler; //导入依赖的package包/类
private Process startServer(int client_port, int port, boolean python) throws IOException {
    File f = new File(TestDependent.TEST_PYDEV_PLUGIN_LOC + "pysrc/pydevconsole.py");

    String[] cmdLine;
    if (python) {
        cmdLine = new String[] { TestDependent.PYTHON_EXE, "-u", FileUtils.getFileAbsolutePath(f), "" + port,
                "" + client_port };
    } else {
        cmdLine = new String[] { TestDependent.JAVA_LOCATION, "-classpath", TestDependent.JYTHON_JAR_LOCATION,
                "org.python.util.jython", FileUtils.getFileAbsolutePath(f), "" + port, "" + client_port };
    }

    Process process = Runtime.getRuntime().exec(cmdLine);
    err = new ThreadStreamReader(process.getErrorStream());
    out = new ThreadStreamReader(process.getInputStream());
    err.start();
    out.start();

    this.webServer = new WebServer(client_port);
    XmlRpcServer serverToHandleRawInput = this.webServer.getXmlRpcServer();
    serverToHandleRawInput.setHandlerMapping(new XmlRpcHandlerMapping() {

        @Override
        public XmlRpcHandler getHandler(String handlerName) throws XmlRpcNoSuchHandlerException, XmlRpcException {
            return new XmlRpcHandler() {

                @Override
                public Object execute(XmlRpcRequest request) throws XmlRpcException {
                    return "input_request";
                }
            };
        }
    });

    this.webServer.start();
    return process;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:38,代码来源:XmlRpcTest.java


示例4: PydevConsoleCommunication

import org.apache.xmlrpc.XmlRpcHandler; //导入依赖的package包/类
/**
 * Initializes the xml-rpc communication.
 *
 * @param port the port where the communication should happen.
 * @param process this is the process that was spawned (server for the XML-RPC)
 *
 * @throws MalformedURLException
 */
public PydevConsoleCommunication(int port, final Process process, int clientPort, String[] commandArray,
        String[] envp, String encoding)
        throws Exception {
    this.commandArray = commandArray;
    this.envp = envp;

    finishedExecution = new ConditionEvent(new ICallback0<Boolean>() {

        @Override
        public Boolean call() {
            try {
                process.exitValue();
                return true; // already exited
            } catch (Exception e) {
                return false;
            }
        }
    }, 200);

    //start the server that'll handle input requests
    this.webServer = new WebServer(clientPort);
    XmlRpcServer serverToHandleRawInput = this.webServer.getXmlRpcServer();
    serverToHandleRawInput.setHandlerMapping(new XmlRpcHandlerMapping() {

        @Override
        public XmlRpcHandler getHandler(String handlerName) throws XmlRpcNoSuchHandlerException, XmlRpcException {
            return PydevConsoleCommunication.this;
        }
    });

    this.webServer.start();
    this.stdStreamsThread = new StdStreamsThread(process, encoding);
    this.stdStreamsThread.start();

    IXmlRpcClient client = new ScriptXmlRpcClient(process);
    client.setPort(port);

    this.client = client;

}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:49,代码来源:PydevConsoleCommunication.java


示例5: getHandler

import org.apache.xmlrpc.XmlRpcHandler; //导入依赖的package包/类
public XmlRpcHandler getHandler(String arg0) throws XmlRpcNoSuchHandlerException, XmlRpcException {
	return XmlRpcDHTServer.this.handler;
}
 
开发者ID:shudo,项目名称:overlayweaver,代码行数:4,代码来源:XmlRpcDHTServer.java



注:本文中的org.apache.xmlrpc.XmlRpcHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CompassOverlay类代码示例发布时间:2022-05-22
下一篇:
Java Callback类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap