com.sun.jini.tool.envcheck
Class SubVM

java.lang.Object
  extended by com.sun.jini.tool.envcheck.SubVM

public class SubVM
extends Object

A container for a subtask which runs in a separate and returns a single object by writing that object to System.out.


Field Summary
private static PrintStream origOut
           
 
Constructor Summary
SubVM()
           
 
Method Summary
static void main(String[] args)
          Entry point for the subtask.
private static void writeResponse(Object obj)
          Write the serialized form of the given object to System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

origOut

private static PrintStream origOut
Constructor Detail

SubVM

public SubVM()
Method Detail

main

public static void main(String[] args)
Entry point for the subtask. The first element of args must name a SubVMTask to run; the remaining elements comprise the arguments for the subtask. That task is instantiated, and its run(String[] args) method called passing an array containing only the subtask arguments. The object returned by the run method is written to System.out. If the run method throws an exception, then that exception is written to System.out instead.

Parameters:
args - the command line arguments

writeResponse

private static void writeResponse(Object obj)
                           throws Throwable
Write the serialized form of the given object to System.out.

Parameters:
obj - the object to write
Throws:
Throwable


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.