Changeset 118:2034d0d31067 in iovar


Ignore:
Timestamp:
Mar 4, 2018, 10:56:40 AM (8 months ago)
Author:
Shawn Wilson <shawn@…>
Branch:
default
Phase:
public
Message:

saw_030418_1 - Reorganized shell task classes into smaller sup-packages.

Files:
22 edited
23 moved

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r117 r118  
    22Copyright (C) 2011-2015 Lannocc Technologies
    33@%@~LICENSE~@%@
     4
     5saw_030418_1 - Reorganized shell task classes into smaller sup-packages.
    46
    57saw_030118_2 - Move multishell from /app to /sapp and add a shortcut link at /$$.
  • bin/ls

    r57 r118  
    1 ../WEB-INF/classes/win/iovar/web/bin/List.class
     1../WEB-INF/classes/win/iovar/web/bin/Listing.class
  • src/win/iovar/web/Default.java

    r94 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    88// local imports:
    99import win.iovar.web.bin.shell.*;
    10 import win.iovar.web.bin.shell.task.*;
     10import win.iovar.web.bin.shell.task.call.*;
    1111import win.iovar.web.dev.*;
    1212import win.iovar.web.dev.trans.*;
  • src/win/iovar/web/Executable.java

    r116 r118  
    5959     */
    6060    public abstract void exec (final IO io) throws IOException;
     61   
     62   
     63   
     64   
     65    //------------------------------------
     66    //
     67    //      HttpServlet
     68    //
     69    //------------------------------------
     70   
    6171
    6272   
  • src/win/iovar/web/Utils.java

    r103 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2011-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    77
    88// local imports:
    9 import win.iovar.web.bin.shell.task.Return;
    10 import win.iovar.web.bin.shell.task.Status;
    119import win.iovar.web.dev.*;
     10import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
    1212
    1313// java imports:
  • src/win/iovar/web/bin/Foreground.java

    r57 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    99import win.iovar.web.*;
    1010import win.iovar.web.bin.shell.*;
    11 import win.iovar.web.bin.shell.task.Return;
     11import win.iovar.web.bin.shell.task.call.*;
    1212import win.iovar.web.dev.*;
    1313import win.iovar.web.lib.*;
  • src/win/iovar/web/bin/shell/Interactive.java

    r116 r118  
    99import win.iovar.web.*;
    1010import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
    1112import win.iovar.web.dev.*;
    1213import win.iovar.web.lib.*;
     
    285286       
    286287        // FIXME: content-disposition, allow-origin not yet utilized here
    287         final Return r = Shell.exec (path, params, new TaskData (shell, context, req.getRemoteUser (), req.getSession (), in, req.getContentType (), null, null));
     288        final Return r = Shell.exec (path, params, new IO (shell, context, req.getRemoteUser (), req.getSession (), in, req.getContentType (), null, null));
    288289        Log.debug ("output content type: "+r.type);
    289290        resp.setContentType (r.type);
  • src/win/iovar/web/bin/shell/Shell.java

    r116 r118  
    88// local imports:
    99import win.iovar.parse.*;
    10 import win.iovar.web.Utils;
     10import win.iovar.web.*;
    1111import win.iovar.web.bin.shell.task.*;
    12 //import win.iovar.web.bin.shell.task.legacy.*;
     12import win.iovar.web.bin.shell.task.call.*;
     13import win.iovar.web.bin.shell.task.command.*;
    1314import win.iovar.web.dev.*;
    1415import win.iovar.web.lib.*;
     
    278279                                //task.exec (forked, context, req, resp, out);
    279280
    280                                 final Return r = task.exec (new TaskData (forked, context, user, req.getSession ()));
     281                                final Return r = task.exec (new IO (forked, context, user, req.getSession ()));
    281282                                Log.debug ("cmd returned: "+r);
    282283
     
    363364
    364365                        // prepare a localized session for the script
    365                         final Session local = Call.valueOf (script, params).prepare (params, new TaskData (session, context, user, req.getSession ()));
     366                        final Session local = Call.valueOf (script, params).prepare (params, new IO (session, context, user, req.getSession ()));
    366367                        try
    367368                        {
     
    370371                            //task.exec (session, context, req, resp, out);
    371372                            // FIXME: content-disposition, allow-origin not yet utilized here
    372                             final Return r = task.exec (new TaskData (local, context, user, req.getSession (), req.getInputStream (), req.getContentType (), null, null));
     373                            final Return r = task.exec (new IO (local, context, user, req.getSession (), req.getInputStream (), req.getContentType (), null, null));
    373374                            Log.debug ("script returned: "+r);
    374375
     
    463464
    464465                        //task.exec (session, context, req, resp, out);
    465                         final Return r = task.exec (new TaskData (session, context, user, req.getSession ()));
     466                        final Return r = task.exec (new IO (session, context, user, req.getSession ()));
    466467                        Log.debug ("cmd (stdin) returned: "+r);
    467468                       
     
    491492     * Execute a given literal command with parameters (no shell processing occurs).
    492493     */
    493     public static Return exec (final String resource, final Map<String,List<String>> params, final TaskData task) throws IOException, ServletException
     494    public static Return exec (final String resource, final Map<String,List<String>> params, final IO io) throws IOException, ServletException
    494495    {
    495496        Log.debug ("shell exec: "+resource);
    496         Return r = Call.valueOf (resource, params).exec (task);
     497        Return r = Call.valueOf (resource, params).exec (io);
    497498        Log.debug ("shell exec returned: "+r);
    498499        return r;
  • src/win/iovar/web/bin/shell/task/Command.java

    r51 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    1717 * @author  shawn@lannocc.com
    1818 */
    19 abstract class Command
     19public interface Command
    2020{
    2121
  • src/win/iovar/web/bin/shell/task/Group.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    99import win.iovar.parse.*;
    1010import win.iovar.web.*;
     11import win.iovar.web.bin.shell.task.call.*;
     12import win.iovar.web.bin.shell.task.command.*;
     13import win.iovar.web.bin.shell.task.group.*;
    1114import win.iovar.web.dev.*;
    1215import win.iovar.web.lib.*;
     
    2124
    2225/**
    23  * One or more comments (ignored), blocks and/or operations, invoked sequentially (an informal list), sometimes conditionally.
     26 * One or more comments (ignored), blocks and/or io units, invoked sequentially (an informal list), sometimes conditionally.
    2427 * Will not assemble an empty group (however a group may simply be whitespace or a comment). [IS THIS STILL TRUE???--SAW]
    2528 *
     
    2831 * @author  shawn@lannocc.com
    2932 */
    30 public class Group implements Graph, Task
     33public class Group implements Graph, IOUnit
    3134{
    3235    List tasks; // list of Task items as well as possible conditionials (Or, And)
     
    8386            else if (or.assemble (in))
    8487            {
    85                 if (tasks.isEmpty () || ! (tasks.get (tasks.size ()-1) instanceof Task))
     88                if (tasks.isEmpty () || ! (tasks.get (tasks.size ()-1) instanceof IOUnit))
    8689                {
    8790                    throw new GraphException ("expecting a Task to precede 'Or' condition: "+or);
     
    9396            else if (and.assemble (in))
    9497            {
    95                 if (tasks.isEmpty () || ! (tasks.get (tasks.size ()-1) instanceof Task))
     98                if (tasks.isEmpty () || ! (tasks.get (tasks.size ()-1) instanceof IOUnit))
    9699                {
    97100                    throw new GraphException ("expecting a Task to precede 'And' condition: "+and);
     
    107110                    final Object last = tasks.get (tasks.size ()-1);
    108111                   
    109                     if (! (last instanceof Task))
     112                    if (! (last instanceof IOUnit))
    110113                    {
    111114                        throw new GraphException ("expecting a Task to follow the last condition: "+last);
     
    129132    }
    130133
    131     public Return exec (final TaskData tdata) throws IOException, ServletException
     134    public Return exec (final IO io) throws IOException, ServletException
    132135    {
    133136        Log.debug ("exec: "+this);
     
    135138        final ByteArrayOutputStream out = new ByteArrayOutputStream ();
    136139        Return r = null;
    137         Task task = null;
    138        
    139         Session shell = tdata.shell;
    140         InputStream in = tdata.in;
     140        IOUnit task = null;
     141       
     142        Session shell = io.shell;
     143        InputStream in = io.in;
    141144       
    142145        boolean skip = false;
     
    148151                skip = false;
    149152            }
    150             else if (taskOrCondition instanceof Task)
    151             {
    152                 task = (Task) taskOrCondition;
     153            else if (taskOrCondition instanceof IOUnit)
     154            {
     155                task = (IOUnit) taskOrCondition;
    153156               
    154157                final Return r_old = r;
    155158                Log.debug ("task exec: "+task);
    156                 r = task.exec (new TaskData (shell, tdata.context, tdata.user, tdata.htsession, in, tdata.contentType, tdata.disposition, tdata.allowOrigin));
     159                r = task.exec (new IO (shell, io.context, io.user, io.htsession, in, io.contentType, io.disposition, io.allowOrigin));
    157160                Log.debug ("task exec returned: "+r);
    158161                if (r==null) r = r_old; // may be null if operation was simply variable assignment
     
    162165                // FIXME: re-evaluate
    163166                Log.debug ("reloading session: "+shell);
    164                 shell = Sessions.load (tdata.context, tdata.htsession, shell.getPath ());
     167                shell = Sessions.load (io.context, io.htsession, shell.getPath ());
    165168                // FIXME: hardcoded path to shell session storage
    166169                //shell = (Session) Utils.xstream.fromXML (Transport.handler ("local:/proc/shell/"+shell.getId (), tdata.context).get ());
  • src/win/iovar/web/bin/shell/task/IO.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
    3  * Copyright (C) 2015 Lannocc Technologies
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
     3 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
     
    1717
    1818/**
    19  * Encapsulation of all the data required for task execution.
     19 * Encapsulation of all the data required for IO unit execution.
    2020 *
    2121 * @author  shawn@lannocc.com
    2222 */
    23 public class TaskData
     23public class IO
    2424{
    2525    public final Session shell;
     
    3131    public final String disposition;
    3232    public final String allowOrigin;
    33    
     33
    3434    /**
    3535     * Minimal constructor.
    3636     */
    37     public TaskData (final Session shell, final ServletContext context, final String user, final HttpSession htsession)
     37    public IO (final Session shell, final ServletContext context, final String user, final HttpSession htsession)
    3838    {
    3939        this (shell, context, user, htsession, null, null, null, null);
    4040    }
    41    
     41
    4242    /**
    4343     * Maximal constructor.
    4444     */
    45     public TaskData (final Session shell, final ServletContext context, final String user, final HttpSession htsession, final InputStream in, final String contentType, final String disposition, final String allowOrigin)
     45    public IO (final Session shell, final ServletContext context, final String user, final HttpSession htsession, final InputStream in, final String contentType, final String disposition, final String allowOrigin)
    4646    {
     47        super ();
    4748        this.shell = shell;
    4849        this.context = context;
     
    5455        this.allowOrigin = allowOrigin;
    5556    }
    56    
     57
    5758    public String toString ()
    5859    {
    59         return super.toString () + " { shell: "+shell+" }";
     60        return super.toString () + " { shell: " + shell + " }";
    6061    }
    6162}
  • src/win/iovar/web/bin/shell/task/IOUnit.java

    r51 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    77
    88// local imports:
     9import win.iovar.web.bin.shell.task.call.*;
    910
    1011// java imports:
     
    1920 * @author  shawn@lannocc.com
    2021 */
    21 interface Task
     22public interface IOUnit
    2223{
    2324    //Status run (final Reader in, final Writer out, final Writer err) throws IOException;
    2425   
    25     Return exec (final TaskData task) throws IOException, ServletException;
     26    Return exec (final IO io) throws IOException, ServletException;
    2627}
  • src/win/iovar/web/bin/shell/task/Script.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.call.*;
    1011import win.iovar.web.dev.*;
    1112
     
    2223 * @author  shawn@lannocc.com
    2324 */
    24 public class Script implements Graph, Task
     25public class Script implements Graph, IOUnit
    2526{
    2627    HashBang interpreter;
     
    5758     * this is shell exec only: the calling party is responsible for invoking any other interpreter
    5859     */
    59     public Return exec (final TaskData task) throws IOException, ServletException
     60    public Return exec (final IO io) throws IOException, ServletException
    6061    {
    6162/*
     
    6768}
    6869*/
    69         return ops.exec (task);
     70        return ops.exec (io);
    7071    }
    7172   
  • src/win/iovar/web/bin/shell/task/Text.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    1919 * @author  shawn@lannocc.com
    2020 */
    21 interface Text
     21public interface Text
    2222{
    2323    public String value (final Session shell, final ServletContext context, final HttpSession htsession);
  • src/win/iovar/web/bin/shell/task/Whitespace.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    1818 * @author  shawn@lannocc.com
    1919 */
    20 class Whitespace implements Graph
     20public class Whitespace implements Graph
    2121{
    2222    public boolean assemble (final GraphReader in) throws IOException
  • src/win/iovar/web/bin/shell/task/call/CallText.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.call;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.text.*;
    1012import win.iovar.web.lib.*;
    1113
     
    2325 * @author  shawn@lannocc.com
    2426 */
    25 class CommandText implements Graph
     27public class CallText implements Graph
    2628{
    27     List<Text> items;
     29    public List<Text> items;
    2830   
    29     CommandText ()
     31    public CallText ()
    3032    {
    3133        items = new ArrayList<Text> ();
    3234    }
    3335   
    34     CommandText (final List<Text> items)
     36    CallText (final List<Text> items)
    3537    {
    3638        this.items = items;
    3739    }
    3840   
    39     CommandText (final String text)
     41    CallText (final String text)
    4042    {
    4143        this.items = new ArrayList<Text> (1);
     
    135137     *          <tt>null</tt> if the character was not found.
    136138     */
    137     public CommandText splitAt (final char c)
     139    public CallText splitAt (final char c)
    138140    {
    139141        final ArrayList<Text> before = new ArrayList<Text> (items.size());
     
    162164        {
    163165            this.items = before;
    164             return new CommandText (after);
     166            return new CallText (after);
    165167        }
    166168        else
  • src/win/iovar/web/bin/shell/task/call/Parameter.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.call;
    77
    88// local imports:
     
    2121public class Parameter implements Graph
    2222{
    23     CommandText name;
    24     CommandText value;
     23    CallText name;
     24    CallText value;
    2525   
    26     Parameter ()
     26    public Parameter ()
    2727    {
    2828       
    2929    }
    3030   
    31     Parameter (final String name, final String value)
     31    public Parameter (final String name, final String value)
    3232    {
    33         this.name = new CommandText (name);
    34         this.value = new CommandText (value);
     33        this.name = new CallText (name);
     34        this.value = new CallText (value);
    3535    }
    3636   
     
    4040        in.discard ();
    4141       
    42         name = new CommandText ();
     42        name = new CallText ();
    4343        if (! name.assemble (in)) return false;
    4444       
     
    4747    }
    4848   
    49     public CommandText getName ()
     49    public CallText getName ()
    5050    {
    5151        return name;
    5252    }
    5353   
    54     public CommandText getValue ()
     54    public CallText getValue ()
    5555    {
    5656        return value;
  • src/win/iovar/web/bin/shell/task/call/Return.java

    r51 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.call;
    77
    88// local imports:
    99import win.iovar.web.dev.Log;
     10import win.iovar.web.bin.shell.task.*;
    1011
    1112// java imports:
  • src/win/iovar/web/bin/shell/task/command/And.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011
    1112// java imports:
     
    1819 * @author  shawn@lannocc.com
    1920 */
    20 class And extends Command implements Graph
     21public class And implements Command, Graph
    2122{
    2223    public boolean assemble (final GraphReader in) throws IOException
  • src/win/iovar/web/bin/shell/task/command/Background.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011import win.iovar.web.dev.*;
    1112
     
    2021 * @author  shawn@lannocc.com
    2122 */
    22 class Background extends Command implements Graph
     23public class Background implements Command, Graph
    2324{
    2425    public boolean assemble (final GraphReader in) throws IOException
  • src/win/iovar/web/bin/shell/task/command/Call.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
     
    1010import win.iovar.web.*;
    1111import win.iovar.web.bin.shell.*;
     12import win.iovar.web.bin.shell.task.*;
     13import win.iovar.web.bin.shell.task.call.*;
     14import win.iovar.web.bin.shell.task.text.*;
    1215import win.iovar.web.dev.*;
    1316import win.iovar.web.dev.trans.*;
     
    2730 * @author  shawn@lannocc.com
    2831 */
    29 public class Call extends Command implements Graph, Task
     32public class Call implements Command, Graph, IOUnit
    3033{
    31     List<CommandText> data; // un-normalized command and anonymous arguments
     34    List<CallText> data; // un-normalized command and anonymous arguments
    3235    List<Parameter> params; // named parameters
    3336   
     
    3639    List<String> args;  // anonymous arguments
    3740   
    38     Call ()
    39     {
    40         this.data = new ArrayList<CommandText> ();
     41    public Call ()
     42    {
     43        this.data = new ArrayList<CallText> ();
    4144        this.params = new ArrayList<Parameter> ();
    4245       
     
    4851    {
    4952        // re-usable objects for testing
    50         CommandText text = new CommandText ();
     53        CallText text = new CallText ();
    5154        Whitespace white = new Whitespace ();
    5255        Parameter param = new Parameter ();
     
    5760       
    5861        this.data.add (text);
    59         text = new CommandText ();
     62        text = new CallText ();
    6063       
    6164        for (int c; (c = in.peek ())>=0; )
     
    7477            {
    7578                this.data.add (text);
    76                 text = new CommandText ();
     79                text = new CallText ();
    7780            }
    7881            else
     
    9699        StringBuffer arg = null;
    97100
    98         for (final CommandText segment : data)
     101        for (final CallText segment : data)
    99102        {
    100103            for (final Text text : segment.items)
     
    191194    }
    192195   
    193     public Return exec (final TaskData task) throws IOException, ServletException
     196    public Return exec (final IO io) throws IOException, ServletException
    194197    {
    195198        Log.info ("executing: "+this);
    196         Log.debug ("task: "+task);
     199        Log.debug ("task: "+io);
    197200       
    198201        // 0. normalize command name / arguments
     
    201204        if (this.data != null && ! this.data.isEmpty ())
    202205        {
    203             normalize (task.shell, task.context, task.htsession);
     206            normalize (io.shell, io.context, io.htsession);
    204207        }
    205208       
     
    208211        for (final Parameter param : this.params)
    209212        {
    210             final String name = param.getName ().value (task.shell, task.context, task.htsession);
    211             final CommandText value = param.getValue ();
     213            final String name = param.getName ().value (io.shell, io.context, io.htsession);
     214            final CallText value = param.getValue ();
    212215
    213216            List<String> vals = params.get (name);
     
    218221            }
    219222           
    220             vals.add (value!=null ? value.value (task.shell, task.context, task.htsession) : null );
     223            vals.add (value!=null ? value.value (io.shell, io.context, io.htsession) : null );
    221224        }
    222225       
     
    227230        }
    228231       
    229         Session local = prepare (params, task); try
     232        Session local = prepare (params, io); try
    230233        {
    231234            // 8. invoke
     
    233236            params.put (Shell.EXT_PARAM_SESSION, Arrays.asList (new String[] { "local:/proc/shell/"+local.getId () }));
    234237           
    235             final Transport t = Which.reference (local, task.context, task.user, cmd, params, task.htsession);
     238            final Transport t = Which.reference (local, io.context, io.user, cmd, params, io.htsession);
    236239            if (t!=null)
    237240            {
     
    246249                }
    247250               
    248                 return invoke (local, t, task.context, task.in, task.contentType, params, task.htsession);
     251                return invoke (local, t, io.context, io.in, io.contentType, params, io.htsession);
    249252            }
    250253            else
     
    256259        finally
    257260        {
    258             local.delete (task.context, task.htsession);
    259         }
    260     }
    261    
    262     public Session prepare (final Map<String,List<String>> params, final TaskData task) throws IOException, ServletException
     261            local.delete (io.context, io.htsession);
     262        }
     263    }
     264   
     265    public Session prepare (final Map<String,List<String>> params, final IO io) throws IOException, ServletException
    263266    {
    264267        // 3. clear previous exit value
    265         task.shell.clearExit ();
    266         task.shell.save (task.context, task.htsession);
     268        io.shell.clearExit ();
     269        io.shell.save (io.context, io.htsession);
    267270       
    268271        // 4. fork the session
    269         final Session local = task.shell.fork (task.context);
     272        final Session local = io.shell.fork (io.context);
    270273        Log.info ("forked local session: "+local);
    271274
     
    306309
    307310        // 7. set user
    308         local.set (Session.ENV_USER, task.user);
     311        local.set (Session.ENV_USER, io.user);
    309312
    310313        return local;
     
    352355            final StringBuffer s = new StringBuffer ("<(non-normalized call)");
    353356           
    354             for (final CommandText text : this.data)
     357            for (final CallText text : this.data)
    355358            {
    356359                s.append (" ").append (text);
  • src/win/iovar/web/bin/shell/task/command/Chain.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011
    1112// java imports:
     
    1920 * @author  shawn@lannocc.com
    2021 */
    21 class Chain extends Command implements Graph
     22public class Chain implements Command, Graph
    2223{
    2324    boolean buffered;
  • src/win/iovar/web/bin/shell/task/command/Input.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
    1012import win.iovar.web.dev.*;
    1113import win.iovar.web.lib.*;
     
    2224 * @author  shawn@lannocc.com
    2325 */
    24 class Input extends Command implements Graph
     26public class Input implements Command, Graph
    2527{
    26     CommandText resource;
     28    CallText resource;
    2729   
    2830    public boolean assemble (final GraphReader in) throws IOException, GraphException
     
    3335        new Whitespace ().assemble (in);
    3436       
    35         CommandText resource = new CommandText ();
     37        CallText resource = new CallText ();
    3638        if (! resource.assemble (in)) throw new GraphException ("expecting resource name to follow '<' command");
    3739        this.resource = resource;
  • src/win/iovar/web/bin/shell/task/command/Or.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011
    1112// java imports:
     
    1819 * @author  shawn@lannocc.com
    1920 */
    20 class Or extends Command implements Graph
     21public class Or implements Command, Graph
    2122{
    2223    public boolean assemble (final GraphReader in) throws IOException
  • src/win/iovar/web/bin/shell/task/command/Output.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
    1012import win.iovar.web.dev.*;
    1113import win.iovar.web.lib.*;
     
    2325 * @author  shawn@lannocc.com
    2426 */
    25 class Output extends Command implements Graph
     27public class Output implements Command, Graph
    2628{
    2729    boolean append = false;
    28     CommandText resource;
     30    CallText resource;
    2931   
    3032    public boolean assemble (final GraphReader in) throws IOException, GraphException
     
    4143        new Whitespace ().assemble (in);
    4244       
    43         CommandText resource = new CommandText ();
     45        CallText resource = new CallText ();
    4446        if (! resource.assemble (in)) throw new GraphException ("expecting resource name to follow '>' command");
    4547        this.resource = resource;
  • src/win/iovar/web/bin/shell/task/command/VariableAssign.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.command;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
     12import win.iovar.web.bin.shell.task.text.*;
    1013
    1114// java imports:
     
    1922 * @author  shawn@lannocc.com
    2023 */
    21 class VariableAssign extends Command implements Graph
     24public class VariableAssign implements Command, Graph
    2225{
    2326    String name;
    24     CommandText value;
     27    CallText value;
    2528   
    2629    public boolean assemble (final GraphReader in) throws IOException, GraphException
     
    3740        in.discard (); // equals sign
    3841       
    39         value = new CommandText ();
     42        value = new CallText ();
    4043        if (! value.assemble (in)) value = null;
    4144       
     
    4851    }
    4952   
    50     public CommandText getValue ()
     53    public CallText getValue ()
    5154    {
    5255        return value;
  • src/win/iovar/web/bin/shell/task/group/Block.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.group;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
    1012import win.iovar.web.dev.*;
    1113
     
    2123 * @author  shawn@lannocc.com
    2224 */
    23 class Block implements Graph, Task
     25public class Block implements Graph, IOUnit
    2426{
    2527    Group ops;
     
    4244    }
    4345   
    44     public Return exec (final TaskData task) throws IOException, ServletException
     46    public Return exec (final IO io) throws IOException, ServletException
    4547    {
    46         return ops.exec (task);
     48        return ops.exec (io);
    4749    }
    4850   
  • src/win/iovar/web/bin/shell/task/group/Comment.java

    r55 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.group;
    77
    88// local imports:
     
    1818 * @author  shawn@lannocc.com
    1919 */
    20 class Comment implements Graph
     20public class Comment implements Graph
    2121{
    2222    String val;
  • src/win/iovar/web/bin/shell/task/group/DoWhile.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.group;
    77
    88// local imports:
    99import win.iovar.parse.*;
    1010import win.iovar.web.*;
     11import win.iovar.web.bin.shell.task.*;
     12import win.iovar.web.bin.shell.task.call.*;
    1113import win.iovar.web.dev.*;
    1214import win.iovar.web.lib.*;
     
    2426 * @author  shawn@lannocc.com
    2527 */
    26 public class DoWhile implements Graph, Task
     28public class DoWhile implements Graph, IOUnit
    2729{
    28     Task todo;
    29     Task condition;
     30    IOUnit todo;
     31    IOUnit condition;
    3032   
    3133    public boolean assemble (final GraphReader in) throws IOException, GraphException
     
    8486    }
    8587   
    86     public Return exec (final TaskData task) throws IOException, ServletException
     88    public Return exec (final IO io) throws IOException, ServletException
    8789    {
    8890        // NOTE: this logic mostly copied from Group.
     
    9193        Return r = null;
    9294       
    93         Session shell = task.shell;
     95        Session shell = io.shell;
    9496       
    9597        // FIXME: does it really make sense to allow input piping here?
    96         InputStream in = task.in;
     98        InputStream in = io.in;
    9799       
    98100        do
     
    105107            Return r_old = r;
    106108           
    107             r = todo.exec (new TaskData (shell, task.context, task.user, task.htsession, in, task.contentType, task.disposition, task.allowOrigin));
     109            r = todo.exec (new IO (shell, io.context, io.user, io.htsession, in, io.contentType, io.disposition, io.allowOrigin));
    108110            Log.debug ("todo exec returned: "+r);
    109111            if (r==null) r = r_old; // may be null if operation was simply variable assignment
     
    113115            // FIXME: re-evaluate
    114116            Log.debug ("reloading session: "+shell);
    115             shell = Sessions.load (task.context, task.htsession, shell.getPath ());
     117            shell = Sessions.load (io.context, io.htsession, shell.getPath ());
    116118           
    117119            in = null;
     
    122124            //out2.flush ();
    123125
    124             r = condition.exec (new TaskData (shell, task.context, task.user, task.htsession, in, task.contentType, task.disposition, task.allowOrigin));
     126            r = condition.exec (new IO (shell, io.context, io.user, io.htsession, in, io.contentType, io.disposition, io.allowOrigin));
    125127            Log.debug ("condition exec returned: "+r);
    126128            if (r==null) r = r_old; // may be null if operation was simply variable assignment
     
    130132            // FIXME: re-evaluate
    131133            Log.debug ("reloading session: "+shell);
    132             shell = Sessions.load (task.context, task.htsession, shell.getPath ());
     134            shell = Sessions.load (io.context, io.htsession, shell.getPath ());
    133135           
    134136            //out2.write ("post-condition: "+shell.toString ()+'\n');
  • src/win/iovar/web/bin/shell/task/group/Operation.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.group;
    77
    88// local imports:
    99import win.iovar.parse.*;
    1010import win.iovar.web.*;
     11import win.iovar.web.bin.shell.task.*;
     12import win.iovar.web.bin.shell.task.call.*;
     13import win.iovar.web.bin.shell.task.command.*;
    1114import win.iovar.web.dev.*;
    1215import win.iovar.web.lib.*;
     
    2528 * @author  shawn@lannocc.com
    2629 */
    27 class Operation implements Graph, Task
     30public class Operation implements Graph, IOUnit
    2831{
    2932    List<Command> cmds;
     
    143146     * Note this returns <tt>null</tt> if the operation is merely a variable assignment.
    144147     */
    145     public Return exec (final TaskData task) throws IOException, ServletException
    146     {
    147         Log.debug ("passed-in contentType: "+task.contentType);
     148    public Return exec (final IO io) throws IOException, ServletException
     149    {
     150        Log.debug ("passed-in contentType: "+io.contentType);
    148151        // FIXME: use PipedInputStream + PipedOutputStream in a new thread
    149152       
     
    151154        Return r = null;
    152155       
    153         Session shell = task.shell;
     156        Session shell = io.shell;
    154157       
    155158        Call call = null;
     
    163166                final VariableAssign var = (VariableAssign) cmd;
    164167                final String name = var.getName ();
    165                 final CommandText val = var.getValue ();
     168                final CallText val = var.getValue ();
    166169               
    167170                // FIXME: re-evaluate this...
    168171               
    169                 shell.set (name, val!=null ? val.value (shell, task.context, task.htsession) : null);
     172                shell.set (name, val!=null ? val.value (shell, io.context, io.htsession) : null);
    170173                //shell.export (1, context, name, val!=null ? val.value (shell, context) : null);
    171174               
     
    173176                // FIXME: not sure about saving here
    174177               
    175                 shell.save (task.context, task.htsession);
     178                shell.save (io.context, io.htsession);
    176179                //shell.saveUp (1, context);
    177180            }
     
    182185            else if (cmd instanceof Chain)
    183186            {
    184                 r = call.exec (new TaskData (shell, task.context, task.user, task.htsession, from!=null ? from.read (shell, task.context, task.htsession) : (r!=null ? r.data : task.in),
    185                         from!=null ? null : (r!=null ? r.type : task.contentType),
    186                         from!=null ? null : (r!=null ? r.disposition : task.disposition),
    187                         from!=null ? null : (r!=null ? r.allowOrigin : task.allowOrigin)
     187                r = call.exec (new IO (shell, io.context, io.user, io.htsession, from!=null ? from.read (shell, io.context, io.htsession) : (r!=null ? r.data : io.in),
     188                        from!=null ? null : (r!=null ? r.type : io.contentType),
     189                        from!=null ? null : (r!=null ? r.disposition : io.disposition),
     190                        from!=null ? null : (r!=null ? r.allowOrigin : io.allowOrigin)
    188191                ));
    189192                Utils.pipe (r.data, out);
     
    194197                // FIXME: re-evaluate
    195198                Log.debug ("reloading session: "+shell);
    196                 shell = Sessions.load (task.context, task.htsession, shell.getPath ());
     199                shell = Sessions.load (io.context, io.htsession, shell.getPath ());
    197200                // FIXME: hardcoded path to shell session storage
    198201                //shell = (Session) Utils.xstream.fromXML (Transport.handler ("local:/proc/shell/"+shell.getId (), task.context).get ());
     
    228231               
    229232                // FIXME: content-type, disposition, allow-origin not yet utilized here
    230                 final Job job = Job.background (call, new TaskData (shell, task.context, task.user, task.htsession, from!=null ? from.read (shell, task.context, task.htsession) : (r!=null ? r.data : task.in), null, null, null));
     233                final Job job = Job.background (call, new IO (shell, io.context, io.user, io.htsession, from!=null ? from.read (shell, io.context, io.htsession) : (r!=null ? r.data : io.in), null, null, null));
    231234                out.write (job.toString ().getBytes ());
    232235                r = new Return (new ByteArrayInputStream (out.toByteArray ()), new Status () {
     
    248251            {
    249252                // FIXME: contentType not fully utilized here
    250                 r = call.exec (new TaskData (shell, task.context, task.user, task.htsession, from!=null ? from.read (shell, task.context, task.htsession) : (r!=null ? r.data : task.in),
    251                         from!=null ? null : (r!=null ? r.type : task.contentType),
    252                         from!=null ? null : (r!=null ? r.disposition : task.disposition),
    253                         from!=null ? null : (r!=null ? r.allowOrigin : task.allowOrigin)
     253                r = call.exec (new IO (shell, io.context, io.user, io.htsession, from!=null ? from.read (shell, io.context, io.htsession) : (r!=null ? r.data : io.in),
     254                        from!=null ? null : (r!=null ? r.type : io.contentType),
     255                        from!=null ? null : (r!=null ? r.disposition : io.disposition),
     256                        from!=null ? null : (r!=null ? r.allowOrigin : io.allowOrigin)
    254257                ));
    255258                Utils.pipe (r.data, out);
    256                 return new Return (to.write (shell, task.context, new ByteArrayInputStream (out.toByteArray ()), r.type, task.htsession), r.status);
     259                return new Return (to.write (shell, io.context, new ByteArrayInputStream (out.toByteArray ()), r.type, io.htsession), r.status);
    257260            }
    258261            else
    259262            {
    260263                // FIXME: contentType not fully utilized here???
    261                 return call.exec (new TaskData (shell, task.context, task.user, task.htsession, from!=null ? from.read (shell, task.context, task.htsession) : (r!=null ? r.data : task.in),
    262                         from!=null ? null : (r!=null ? r.type : task.contentType),
    263                         from!=null ? null : (r!=null ? r.disposition : task.disposition),
    264                         from!=null ? null : (r!=null ? r.allowOrigin : task.allowOrigin)
     264                return call.exec (new IO (shell, io.context, io.user, io.htsession, from!=null ? from.read (shell, io.context, io.htsession) : (r!=null ? r.data : io.in),
     265                        from!=null ? null : (r!=null ? r.type : io.contentType),
     266                        from!=null ? null : (r!=null ? r.disposition : io.disposition),
     267                        from!=null ? null : (r!=null ? r.allowOrigin : io.allowOrigin)
    265268                ));
    266269            }
  • src/win/iovar/web/bin/shell/task/text/Escaped.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.text;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011import win.iovar.web.lib.*;
    1112
     
    2122 * @author  shawn@lannocc.com
    2223 */
    23 class Escaped implements Graph, Text
     24public class Escaped implements Graph, Text
    2425{
    2526    char c;
    2627   
    27     Escaped ()
     28    public Escaped ()
    2829    {
    2930    }
  • src/win/iovar/web/bin/shell/task/text/HardQuoted.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.text;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011import win.iovar.web.lib.*;
    1112
     
    2122 * @author  shawn@lannocc.com
    2223 */
    23 class HardQuoted implements Graph, Text
     24public class HardQuoted implements Graph, Text
    2425{
    2526    String str;
    2627   
    27     HardQuoted ()
     28    public HardQuoted ()
    2829    {
    2930    }
    3031   
    31     HardQuoted (final String str)
     32    public HardQuoted (final String str)
    3233    {
    3334        this.str = str;
  • src/win/iovar/web/bin/shell/task/text/HotQuoted.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.text;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
    1012import win.iovar.web.dev.*;
    1113import win.iovar.web.lib.*;
     
    2325 * @author  shawn@lannocc.com
    2426 */
    25 class HotQuoted implements Graph, Text, Task
     27public class HotQuoted implements Graph, Text, IOUnit
    2628{
    2729    List<Graph> items;
    2830   
    29     HotQuoted ()
     31    public HotQuoted ()
    3032    {
    3133        this.items = new ArrayList<Graph> (30);
     
    9698        {
    9799            /* FIXME (user) */
    98             final Return r = exec (new TaskData (shell, context, null, htsession));
     100            final Return r = exec (new IO (shell, context, null, htsession));
    99101            if (r==null)
    100102            {
     
    131133    }
    132134   
    133     public Return exec (final TaskData task) throws IOException, ServletException
     135    public Return exec (final IO io) throws IOException, ServletException
    134136    {
    135137        Log.debug ("exec: "+this);
     
    140142            if (item instanceof Text)
    141143            {
    142                 value.append (((Text) item).value (task.shell, task.context, task.htsession));
     144                value.append (((Text) item).value (io.shell, io.context, io.htsession));
    143145            }
    144146            else
     
    158160            }
    159161           
    160             return group.exec (task);
     162            return group.exec (io);
    161163        }
    162164        catch (final GraphException e)
  • src/win/iovar/web/bin/shell/task/text/Literal.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.text;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011import win.iovar.web.lib.*;
    1112
     
    2122 * @author  shawn@lannocc.com
    2223 */
    23 class Literal implements Graph, Text
     24public class Literal implements Graph, Text
    2425{
    2526    char c;
    2627   
    27     Literal ()
     28    public Literal ()
    2829    {
    2930    }
  • src/win/iovar/web/bin/shell/task/text/SoftQuoted.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2014 Lannocc Technologies
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.text;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011import win.iovar.web.lib.*;
    1112
     
    2223 * @author  shawn@lannocc.com
    2324 */
    24 class SoftQuoted implements Graph, Text
     25public class SoftQuoted implements Graph, Text
    2526{
    2627    List<Graph> items;
    2728   
    28     SoftQuoted ()
     29    public SoftQuoted ()
    2930    {
    3031        this.items = new ArrayList<Graph> (30);
  • src/win/iovar/web/bin/shell/task/text/Variable.java

    r116 r118  
    44 * @%@~LICENSE~@%@
    55 */
    6 package win.iovar.web.bin.shell.task;
     6package win.iovar.web.bin.shell.task.text;
    77
    88// local imports:
    99import win.iovar.parse.*;
     10import win.iovar.web.bin.shell.task.*;
    1011import win.iovar.web.lib.*;
    1112
     
    2223 * @author  shawn@lannocc.com
    2324 */
    24 class Variable implements Graph, Text
     25public class Variable implements Graph, Text
    2526{
    2627    String name;
    2728   
    28     Variable ()
     29    public Variable ()
    2930    {
    3031    }
  • src/win/iovar/web/dev/Transport.java

    r88 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2011-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    1010import win.iovar.web.lib.*;
    1111import win.iovar.web.dev.trans.*;
    12 import win.iovar.web.bin.shell.task.Return;
     12import win.iovar.web.bin.shell.task.call.*;
    1313
    1414// java imports:
  • src/win/iovar/web/dev/trans/File.java

    r88 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    99import win.iovar.web.bin.shell.*;
    1010import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
    1112import win.iovar.web.dev.*;
    1213import win.iovar.web.lib.*;
     
    348349               
    349350                    // FIXME: presently only local interpreters are supported
    350                     return Shell.exec (interpreter, params, new TaskData (shell, context, user, htsession, data, contentType, null, null));
     351                    return Shell.exec (interpreter, params, new IO (shell, context, user, htsession, data, contentType, null, null));
    351352                }
    352353                catch (final ServletException e)
  • src/win/iovar/web/dev/trans/Http.java

    r88 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2011-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    99import win.iovar.web.*;
    1010import win.iovar.web.bin.shell.*;
    11 import win.iovar.web.bin.shell.task.Return;
     11import win.iovar.web.bin.shell.task.call.*;
    1212import win.iovar.web.dev.*;
    1313import win.iovar.web.lib.*;
  • src/win/iovar/web/dev/trans/Local.java

    r88 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2013-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    77
    88// local imports:
    9 import win.iovar.web.bin.shell.task.*;
     9import win.iovar.web.bin.shell.task.call.*;
    1010import win.iovar.web.dev.*;
    1111import win.iovar.web.lib.*;
  • src/win/iovar/web/dev/trans/Resource.java

    r88 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2011-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    1010import win.iovar.web.bin.shell.*;
    1111import win.iovar.web.bin.shell.task.*;
     12import win.iovar.web.bin.shell.task.call.*;
    1213import win.iovar.web.dev.*;
    1314import win.iovar.web.lib.*;
     
    344345               
    345346                    // FIXME: presently only local interpreters are supported
    346                     return Shell.exec (interpreter, params, new TaskData (shell, context, user, htsession, data, contentType, null, null));
     347                    return Shell.exec (interpreter, params, new IO (shell, context, user, htsession, data, contentType, null, null));
    347348                }
    348349                catch (final ServletException e)
  • src/win/iovar/web/lib/Job.java

    r52 r118  
    11/*
    2  * Copyright (C) 2016 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    99import win.iovar.web.*;
    1010import win.iovar.web.bin.shell.task.*;
     11import win.iovar.web.bin.shell.task.call.*;
     12import win.iovar.web.bin.shell.task.command.*;
    1113import win.iovar.web.dev.*;
    12 import win.iovar.web.bin.shell.task.Return;
    1314
    1415// java imports:
     
    2930   
    3031    final Call call;
    31     final TaskData task;
     32    final IO task;
    3233   
    3334    Return r;
    3435    ByteArrayOutputStream out;
    3536   
    36     Job (final Call call, final TaskData task)
     37    Job (final Call call, final IO task)
    3738    {
    3839        this.call = call;
     
    8788    }
    8889   
    89     public static Job background (final Call call, final TaskData task)
     90    public static Job background (final Call call, final IO task)
    9091    {
    9192        Map<Integer,Job> jobs = getJobs (task.context);
  • src/win/iovar/web/sbin/Init.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    99import win.iovar.web.*;
    1010import win.iovar.web.bin.shell.*;
    11 import win.iovar.web.bin.shell.task.TaskData;
     11import win.iovar.web.bin.shell.task.*;
    1212import win.iovar.web.dev.*;
    1313import win.iovar.web.lib.*;
     
    127127                           
    128128                            // FIXME (user)
    129                             Shell.exec (bootwait.getNodeValue (), null, new TaskData (shell, context, null, null));
     129                            Shell.exec (bootwait.getNodeValue (), null, new IO (shell, context, null, null));
    130130//shell.saveTo ("local:/proc/shell/"+shell.getId (), context);
    131131                        }
  • src/win/iovar/web/usr/bin/XArgs.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    1010import win.iovar.web.bin.shell.*;
    1111import win.iovar.web.bin.shell.task.*;
     12import win.iovar.web.bin.shell.task.call.*;
    1213import win.iovar.web.dev.*;
    1314import win.iovar.web.lib.*;
     
    291292        }
    292293
    293         final Return r = Shell.exec (resource, callParams, new TaskData (session, context, req.getRemoteUser (), req.getSession ()));
     294        final Return r = Shell.exec (resource, callParams, new IO (session, context, req.getRemoteUser (), req.getSession ()));
    294295        resp.setContentType (r.type);
    295296        Utils.pipe (r.data, resp.getOutputStream ());
  • src/win/iovar/web/usr/sbin/Cron.java

    r76 r118  
    11/*
    2  * Copyright (C) 2016-2017 Virgo Venture, Inc.
     2 * Copyright (C) 2016-2018 Virgo Venture, Inc.
    33 * Copyright (C) 2014-2015 Lannocc Technologies
    44 * @%@~LICENSE~@%@
     
    99import win.iovar.web.*;
    1010import win.iovar.web.bin.shell.*;
    11 import win.iovar.web.bin.shell.task.Call;
    12 import win.iovar.web.bin.shell.task.TaskData;
     11import win.iovar.web.bin.shell.task.*;
     12import win.iovar.web.bin.shell.task.command.*;
    1313import win.iovar.web.dev.*;
    1414import win.iovar.web.lib.*;
     
    144144                if ("daily".equals (freq))
    145145                {
    146                     job = new DailyJob (cmd, args, new TaskData (shell, context, user, req.getSession ()), null);
     146                    job = new DailyJob (cmd, args, new IO (shell, context, user, req.getSession ()), null);
    147147                }
    148148                else try
    149149                {
    150                     job = new HertzJob (Integer.parseInt (freq), cmd, args, new TaskData (shell, context, user, req.getSession ()));
     150                    job = new HertzJob (Integer.parseInt (freq), cmd, args, new IO (shell, context, user, req.getSession ()));
    151151                }
    152152                catch (final NumberFormatException e)
     
    158158                        cal.setTime (time);
    159159                       
    160                         job = new DailyJob (cmd, args, new TaskData (shell, context, user, req.getSession ()), cal);
     160                        job = new DailyJob (cmd, args, new IO (shell, context, user, req.getSession ()), cal);
    161161                    }
    162162                    catch (final ParseException ee)
     
    212212        final Call call;
    213213       
    214         final TaskData task;
    215        
    216         Job (final String cmd, final List<String> args, final TaskData task)
     214        final IO task;
     215       
     216        Job (final String cmd, final List<String> args, final IO task)
    217217        {
    218218            Map argMap = new HashMap<String,List<String>> ();
     
    259259        final int secs;
    260260       
    261         HertzJob (final int secs, final String cmd, final List<String> args, final TaskData task)
     261        HertzJob (final int secs, final String cmd, final List<String> args, final IO task)
    262262        {
    263263            super (cmd, args, task);
     
    280280        final Calendar next;
    281281       
    282         DailyJob (final String cmd, final List<String> args, final TaskData task, final Calendar time)
     282        DailyJob (final String cmd, final List<String> args, final IO task, final Calendar time)
    283283        {
    284284            super (cmd, args, task);
Note: See TracChangeset for help on using the changeset viewer.