Package org.boris.xlloop.reflect

Examples of org.boris.xlloop.reflect.ReflectFunctionHandler


    public FunctionHandlerServer(int port, boolean debug) {
        super(port);
        this.handler = new CompositeFunctionHandler();
        this.debug = new DebugFunctionHandler(handler);
        this.rfh = new ReflectFunctionHandler();
        this.dfh = new DelegateFunctionHandler();
        this.info = new FunctionInformationHandler();
        setDebug(debug);
        handler.add(rfh);
        handler.add(dfh);
View Full Code Here


    public static FunctionServer createServer(int port) {
        return new FunctionServer(port, new DebugFunctionHandler(createHandler()));
    }

    public static IFunctionHandler createHandler() {
        ReflectFunctionHandler rfh = new ReflectFunctionHandler();
        LispFunctionHandler lfh = new LispFunctionHandler();
        lfh.eval(new File("functions"), true); // evaluate any lisp files
        ScriptRepository srep = new ScriptRepository(new File("functions"), "Script.");
        rfh.addMethods("Math.", Math.class);
        rfh.addMethods("Math.", Maths.class);
        rfh.addMethods("Reflect.", Reflect.class);
        rfh.addMethods("CSV.", CSV.class);
        rfh.addMethods("Test.", Test.class);
        rfh.addMethods("Fin.", Finance1.class);
        rfh.addMethods("", AnnotationsTest.class);
        CompositeFunctionHandler cfh = new CompositeFunctionHandler();
        cfh.add(rfh);
        cfh.add(srep);
        cfh.add(lfh);
        FunctionInformationHandler firh = new FunctionInformationHandler();
        firh.add(rfh.getFunctions());
        firh.add(lfh.getInformation());
        firh.add(srep); // add script repository as a function provider
        cfh.add(firh);
        cfh.add(new MenuHandler(new TestMenu()));
        cfh.add(new CompTest1());
View Full Code Here

    private RequestExecutor re;

    public ClientServerTester() throws Exception {
        super(0);
        cfh = new CompositeFunctionHandler();
        rfh = new ReflectFunctionHandler();
        cfh.add(rfh);
        FunctionInformationHandler fifh = new FunctionInformationHandler();
        fifh.add(rfh);
        cfh.add(fifh);
        socket = new ServerSocket(getPort());
View Full Code Here

TOP

Related Classes of org.boris.xlloop.reflect.ReflectFunctionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.