JanosVM v1.0 API

edu.utah.janosvm.resources
Class StdioSpec

java.lang.Object
  |
  +--edu.utah.janosvm.resources.ResourceSpec
        |
        +--edu.utah.janosvm.resources.StdioSpec
All Implemented Interfaces:
java.lang.Cloneable

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 class edu.utah.janosvm.resources.ResourceSpec
found
 
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()
           
static StdioSpec defaultSpec()
           
 boolean equals(java.lang.Object obj)
           
protected  void finalize()
           
 java.lang.String getError()
           
 java.lang.String getInput()
           
 java.lang.String getOutput()
           
private  void nativeConstructor(java.lang.String inURI, java.lang.String outURI, java.lang.String errURI)
          Construct the native part of this class.
private  void nativeFinalize()
          Finalize the native part of the class.
 java.lang.String toString()
           
 
Methods inherited from class edu.utah.janosvm.resources.ResourceSpec
find, nativeFind
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0
 

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

    nativeConstructor

    private void nativeConstructor(java.lang.String inURI,
                                   java.lang.String outURI,
                                   java.lang.String errURI)
    Construct the native part of this class.

    nativeFinalize

    private void nativeFinalize()
    Finalize the native part of the class.

    finalize

    protected 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.

    defaultSpec

    public static StdioSpec defaultSpec()
    Returns:
    A copy of the default StdioSpec.

    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.

    equals

    public boolean equals(java.lang.Object obj)
    Overrides:
    equals in class java.lang.Object

    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 v1.0 API

    This documentation is Copyright (C) 2000-2003 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 Feb 13, 2003