JanosVM v0.6.0 Java API Documentation: Class StdioSpec
JanosVM v0.6.0 Java API

edu.utah.janosvm.resources
Class StdioSpec

java.lang.Object
  |
  +--edu.utah.janosvm.resources.ResourceSpec
        |
        +--edu.utah.janosvm.resources.StdioSpec

public final class StdioSpec
extends ResourceSpec
implements java.lang.Cloneable

Resource specification for the standard I/O channels for a Team. The standard I/O streams (stdin, stderr, stdout) for a new Team are specified here. Streams are specified in a flexible URI-like format.

Author:
Tim Stack, Utah Janos Team
See Also:
StdioSpec(String,String,String)

Fields inherited from interface java.lang.Cloneable
KAFFE_VERSION
 
Constructor Summary
StdioSpec(java.lang.String inURI, java.lang.String outURI, java.lang.String errURI)
          Constructs a standard I/O resource specification with the given stream identifiers.
 
Method Summary
 java.lang.Object clone()
           
static StdioSpec current()
           
static StdioSpec currentFD()
           
 void finalize()
           
 java.lang.String getError()
           
 java.lang.String getInput()
           
 java.lang.String getOutput()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.utah.janosvm.resources.ResourceSpec
find
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StdioSpec

public StdioSpec(java.lang.String inURI,
                 java.lang.String outURI,
                 java.lang.String errURI)
Constructs a standard I/O resource specification with the given stream identifiers. The stream identifier is a URI like string that describes the type of stream and any additional options. The format is `protocol://path' where protocol is one of:
  • builtin - The VM's "real" stdio streams. Possible paths are:
  • `none' which specifies no stream
  • `stdin' for standard in
  • `stdout' for standard out
  • `stderr' for standard error.
  • jsi - A connected jsiChannel, currently, just the one that executed run of team x.
  • file - A regular file where path should be the path of the file to create.
  • fd - A file descriptor in the VM, the fd given in the path is dup'd and used to build a FILE object.
  • Examples:
  • "builtin://none"
  • "builtin://stdin"
  • "jsi://"
  • "file://foo.out"
  • Parameters:
    inURI - URI for the standard input.
    outURI - URI for the standard output.
    errURI - URI for the standard error.
    Method Detail

    finalize

    public void finalize()
    Overrides:
    finalize in class java.lang.Object

    current

    public static StdioSpec current()
    Returns:
    The StdioSpec object for the current team.

    currentFD

    public static StdioSpec currentFD()
    Returns:
    The StdioSpec object for the current team that has file descriptor URI's. This is useful for sharing input/output streams with child teams.

    getInput

    public java.lang.String getInput()
    Returns:
    The standard input URI.

    getOutput

    public java.lang.String getOutput()
    Returns:
    The standard output URI.

    getError

    public java.lang.String getError()
    Returns:
    The standard error URI.

    toString

    public java.lang.String toString()
    Overrides:
    toString in class java.lang.Object

    clone

    public java.lang.Object clone()
    Overrides:
    clone in class java.lang.Object

    JanosVM v0.6.0 Java API

    This documentation is Copyright (C) 2000-2002 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
    Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
    Generated on Mar 17, 2002