Package net.officefloor
Class OfficeFloorMain
- java.lang.Object
-
- net.officefloor.OfficeFloorMain
-
- Direct Known Subclasses:
OfficeFloorWar
,WoOF
public class OfficeFloorMain extends java.lang.Object
Providesmain
method to compile and runOfficeFloor
.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STD_ERR_FAIL_LINE
Line output tostderr
to indicateOfficeFloor
failed to start.static java.lang.String
STD_OUT_RUNNING_LINE
Line output tostdout
to indicateOfficeFloor
is running.
-
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 embeddedOfficeFloor
.static void
main(java.lang.String... args)
Compiles and runOfficeFloor
.protected static void
mainWithDefaults(java.lang.String[] defaultArgs, java.lang.String... args)
Compiles and runsOfficeFloor
with default arguments.static OfficeFloor
open(java.lang.String... propertyNameValuePairs)
Convenience method to open a singletonOfficeFloor
for embedded use.
-
-
-
Field Detail
-
STD_OUT_RUNNING_LINE
public static java.lang.String STD_OUT_RUNNING_LINE
Line output tostdout
to indicateOfficeFloor
is running.
-
STD_ERR_FAIL_LINE
public static java.lang.String STD_ERR_FAIL_LINE
Line output tostderr
to indicateOfficeFloor
failed to start.
-
-
Method Detail
-
main
public static void main(java.lang.String... args) throws java.lang.Exception
Compiles 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.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 previousOfficeFloor
instance.- Parameters:
propertyNameValuePairs
- Name/valueProperty
pairs.- Returns:
- Opened
OfficeFloor
.
-
close
public static void close()
Closes the singleton embeddedOfficeFloor
.
-
-