Class OfficeFloorMain

java.lang.Object
net.officefloor.OfficeFloorMain
Direct Known Subclasses:
OfficeFloorWar, WoOF

public class OfficeFloorMain extends Object
Provides main method to compile and run OfficeFloor.
Author:
Daniel Sagenschneider
  • Field Details

    • STD_OUT_RUNNING_LINE

      public static String STD_OUT_RUNNING_LINE
      Line output to stdout to indicate OfficeFloor is running.
    • STD_ERR_FAIL_LINE

      public static String STD_ERR_FAIL_LINE
      Line output to stderr to indicate OfficeFloor failed to start.
  • Constructor Details

    • OfficeFloorMain

      public OfficeFloorMain()
  • Method Details

    • main

      public static void main(String... args) throws Exception
      Compiles and run OfficeFloor.
      Parameters:
      args - Command line arguments.
      Throws:
      Exception - If fails to compile and open.
    • mainWithDefaults

      protected static void mainWithDefaults(String[] defaultArgs, String... args) throws Exception

      Compiles and runs OfficeFloor with default arguments.

      This is used by specific main classes to start specific customisations of OfficeFloor.

      Parameters:
      defaultArgs - Default arguments.
      args - Command line arguments.
      Throws:
      Exception - If fails to compile and open.
    • open

      public static OfficeFloor open(String... propertyNameValuePairs)

      Convenience method to open a singleton OfficeFloor for embedded use. This is typically for unit testing.

      Note previously open OfficeFloor instance by this method will be closed. Hence, avoids tests re-using the previous OfficeFloor instance.

      Parameters:
      propertyNameValuePairs - Name/value Property pairs.
      Returns:
      Opened OfficeFloor.
    • close

      public static void close()
      Closes the singleton embedded OfficeFloor.