org.objectweb.dsrg.sofa.cushion
Class Cushion

java.lang.Object
  extended by org.objectweb.dsrg.sofa.cushion.Cushion

public class Cushion
extends java.lang.Object

Main class of the Cushion.


Constructor Summary
Cushion()
           
 
Method Summary
static void main(java.lang.String[] args)
          Main method.
static void printActionResultMessage(ActionInterface action, int actionResult, java.io.PrintStream output)
          Prints out a message that informs user about action result.
static int runCushion(java.lang.String[] args)
          Runs cushion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cushion

public Cushion()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method.

Calls directly runCushion(String[]) and terminates VM with the return value. Use runCushion(String[]) instead whenever the VM termination is not desired.

Parameters:
args - command-line arguments
Throws:
java.lang.Exception - exception

runCushion

public static int runCushion(java.lang.String[] args)
                      throws java.lang.Exception
Runs cushion.

Parameters:
args - command line arguments
Throws:
java.lang.Exception - exception

printActionResultMessage

public static void printActionResultMessage(ActionInterface action,
                                            int actionResult,
                                            java.io.PrintStream output)
Prints out a message that informs user about action result.

Expected action result codes are enumerated as integer constants at ActionInterface.

Parameters:
action - ActionInterface that has been executed
actionResult - action execution result
output - PrintStream