Class OfficeFloorMain

  • Direct Known Subclasses:
    OfficeFloorWar, WoOF

    public class OfficeFloorMain
    extends java.lang.Object
    Provides main method to compile and run OfficeFloor.
    Author:
    Daniel Sagenschneider
    • Constructor Summary

      Constructors 
      Constructor Description
      OfficeFloorMain()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void close()
      Closes the singleton embedded OfficeFloor.
      static void main​(java.lang.String... args)
      Compiles and run OfficeFloor.
      protected static void mainWithDefaults​(java.lang.String[] defaultArgs, java.lang.String... args)
      Compiles and runs OfficeFloor with default arguments.
      static OfficeFloor open​(java.lang.String... propertyNameValuePairs)
      Convenience method to open a singleton OfficeFloor for embedded use.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • STD_OUT_RUNNING_LINE

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

        public static java.lang.String STD_ERR_FAIL_LINE
        Line output to stderr to indicate OfficeFloor failed to start.
    • Constructor Detail

      • OfficeFloorMain

        public OfficeFloorMain()
    • Method Detail

      • main

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

        protected static void mainWithDefaults​(java.lang.String[] defaultArgs,
                                               java.lang.String... args)
                                        throws java.lang.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:
        java.lang.Exception - If fails to compile and open.
      • open

        public static OfficeFloor open​(java.lang.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.