Package org.syrup

Examples of org.syrup.WorkSpace


     *         LogEntries)
     */
    public static int operate(String[] args, InputStream i, OutputStream o)
        throws Exception
    {  
        WorkSpace sp = null;

        try
        {
            sp = (WorkSpace) (new InitialContext()).lookup("syrupWorkSpace");
        }
        catch (Exception e)
        {
            logger.log(Level.INFO, "Did not get syrupWorkSpace key via JNDI. Reverted to default SQLWorkSpace implementation");
            sp = new SQLWorkSpace();
        }

        if (args.length > 0)
        {

            // The first argument is the command.
            if (args[0].equals("reset"))
            {
                sp.reset();
            }
            else if (args[0].equals("in1"))
            {
                sp.set_in_1(read(i));
            }
            else if (args[0].equals("in2"))
            {
                sp.set_in_2(read(i));
            }
            else if (args[0].equals("out1"))
            {
                write(sp.get_out_1(), o);
            }
            else if (args[0].equals("out2"))
            {
                write(sp.get_out_2(), o);
            }
            else if (args[0].equals("match"))
            {
                PTaskTemplate template = new PTaskTemplateImpl(args);
                return match(sp, template, o);
View Full Code Here

TOP

Related Classes of org.syrup.WorkSpace

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.