Package net.officefloor
Class OfficeFloorMain
- java.lang.Object
-
- net.officefloor.OfficeFloorMain
-
- Direct Known Subclasses:
OfficeFloorWar,WoOF
public class OfficeFloorMain extends java.lang.ObjectProvidesmainmethod to compile and runOfficeFloor.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSTD_ERR_FAIL_LINELine output tostderrto indicateOfficeFloorfailed to start.static java.lang.StringSTD_OUT_RUNNING_LINELine output tostdoutto indicateOfficeFlooris running.
-
Constructor Summary
Constructors Constructor Description OfficeFloorMain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose()Closes the singleton embeddedOfficeFloor.static voidmain(java.lang.String... args)Compiles and runOfficeFloor.protected static voidmainWithDefaults(java.lang.String[] defaultArgs, java.lang.String... args)Compiles and runsOfficeFloorwith default arguments.static OfficeFlooropen(java.lang.String... propertyNameValuePairs)Convenience method to open a singletonOfficeFloorfor embedded use.
-
-
-
Field Detail
-
STD_OUT_RUNNING_LINE
public static java.lang.String STD_OUT_RUNNING_LINE
Line output tostdoutto indicateOfficeFlooris running.
-
STD_ERR_FAIL_LINE
public static java.lang.String STD_ERR_FAIL_LINE
Line output tostderrto indicateOfficeFloorfailed to start.
-
-
Method Detail
-
main
public static void main(java.lang.String... args) throws java.lang.ExceptionCompiles and runOfficeFloor.- 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.ExceptionCompiles and runs
OfficeFloorwith 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
OfficeFloorfor embedded use. This is typically for unit testing.Note previously open
OfficeFloorinstance by this method will be closed. Hence, avoids tests re-using the previousOfficeFloorinstance.- Parameters:
propertyNameValuePairs- Name/valuePropertypairs.- Returns:
- Opened
OfficeFloor.
-
close
public static void close()
Closes the singleton embeddedOfficeFloor.
-
-