Class OfficeFrame
- java.lang.Object
-
- net.officefloor.frame.api.OfficeFrame
-
- Direct Known Subclasses:
OfficeFrameImpl
public abstract class OfficeFrame extends java.lang.Object
Office Frame to create the
OfficeFloor
.This is the starting point to use the framework.
- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IMPLEMENTATION_CLASS_PROPERTY_NAME
static java.lang.String
LOG_SOURCE_CLASS_PROPERTY_NAME
System.getProperty(String)
that flags to infer the sourceClass
undertaking the logging.
-
Constructor Summary
Constructors Constructor Description OfficeFrame()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static OfficeFloorBuilder
createOfficeFloorBuilder()
Convenience method to create a singleOfficeFloorBuilder
, as there is typically only oneOfficeFloor
per JVM.abstract OfficeFloorBuilder
createOfficeFloorBuilder(java.lang.String officeFloorName)
Obtains theOfficeFloorBuilder
.static OfficeFrame
getInstance()
Obtains the the Singleton instance of theOfficeFrame
.static java.util.logging.Logger
getLogger(java.lang.String loggerName)
Obtains theLogger
.static void
setInstance(OfficeFrame singleton)
Specifies theOfficeFrame
implementation.
-
-
-
Field Detail
-
IMPLEMENTATION_CLASS_PROPERTY_NAME
public static final java.lang.String IMPLEMENTATION_CLASS_PROPERTY_NAME
System.getProperty(String)
that allows specifying theOfficeFrame
implementationClass
.Should this not be specified the default
OfficeFrameImpl
will be used.Note: it is anticipated that
OfficeFrameImpl
will always be used.- See Also:
- Constant Field Values
-
LOG_SOURCE_CLASS_PROPERTY_NAME
public static final java.lang.String LOG_SOURCE_CLASS_PROPERTY_NAME
System.getProperty(String)
that flags to infer the sourceClass
undertaking the logging.By default the
Logger
instances will specify anull
sourceClass
name so that theLogger
name is used by theSimpleFormatter
. This will then result inLogRecord
instances formatted with theLogger
name.Flagging this
true
will allow the sourceClass
name to be inferred. However, aFormatter
will likely need to be configured to indicate the specificLogger
name to distinguish the configured instance.- See Also:
- Constant Field Values
-
-
Method Detail
-
setInstance
public static final void setInstance(OfficeFrame singleton)
Specifies theOfficeFrame
implementation. Allows for overriding the default implementation.- Parameters:
singleton
-OfficeFrame
implementation.
-
getInstance
public static final OfficeFrame getInstance()
Obtains the the Singleton instance of theOfficeFrame
.- Returns:
- Singleton
OfficeFrame
.
-
createOfficeFloorBuilder
public static final OfficeFloorBuilder createOfficeFloorBuilder()
Convenience method to create a single
OfficeFloorBuilder
, as there is typically only oneOfficeFloor
per JVM.If more than one
OfficeFloor
is required, use theOfficeFrame
returned fromgetInstance()
.- Returns:
OfficeFloorBuilder
.
-
getLogger
public static java.util.logging.Logger getLogger(java.lang.String loggerName)
Obtains theLogger
.- Parameters:
loggerName
- Name ofLogger
.- Returns:
Logger
.
-
createOfficeFloorBuilder
public abstract OfficeFloorBuilder createOfficeFloorBuilder(java.lang.String officeFloorName)
Obtains theOfficeFloorBuilder
.- Parameters:
officeFloorName
- Name of theOfficeFloor
.- Returns:
OfficeFloorBuilder
.
-
-