微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

XLLoop 集中式Excel处理框架

程序名称:XLLoop

授权协议: CPL

操作系统: 未知

开发语言: Java

XLLoop 介绍

XLLoop 是一个开源的框架用来实现集中式(通过一个中央服务器)的Excel处理服务。支持包括
Java、Python、Ruby、JavaScript、ErLang 等语言。

服务器端 Java 示例代码

package org.boris.xlloop.util;

import org.boris.xlloop.FunctionServer;  
import org.boris.xlloop.handler.*;  
import org.boris.xlloop.reflect.*;

public class ServerExample  
{  
    private static final boolean LOAD_BALANCE = false;

    public static void main(String[] args) throws Exception {  
        // Create function server on the default port  
        FunctionServer fs = new FunctionServer();

        // Create a reflection function handler and add the Math methods  
        ReflectFunctionHandler rfh = new ReflectFunctionHandler();  
        rfh.addMethods("Math.", Math.class);  
        rfh.addMethods("Math.", Maths.class);  
        rfh.addMethods("CSV.", CSV.class);  
        rfh.addMethods("Reflect.", Reflect.class);

        // Create a function @R_385_4045@ion handler to register our functions  
        Function@R_385_4045@ionFunctionHandler firh = new Function@R_385_4045@ionFunctionHandler();  
        firh.add(rfh.getFunctions());

        // Create a function handler to demonstrate the "load balancing"  
        // capability  
        GetLoadServerFunctionHandler glsfh = new GetLoadServerFunctionHandler();

        // Set the handlers  
        CompositeFunctionHandler cfh = new CompositeFunctionHandler();  
        cfh.add(rfh);  
        cfh.add(firh);  
        if (LOAD_BALANCE)  
            cfh.add(glsfh);  
        fs.setFunctionHandler(new DebugFunctionHandler(cfh));

        // Run the engine  
        System.out.println("Listening on port " + fs.getPort() + "...");  
        fs.run();  
    }  
}

XLLoop 官网

http://xlloop.sourceforge.net/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐