Package net.officefloor.frame.api.manage
Interface OfficeFloor
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
OfficeFloorImpl
public interface OfficeFloor extends java.lang.AutoCloseable
- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
closeOfficeFloor()
Closes the OfficeFloor.Office
getOffice(java.lang.String officeName)
Obtains theOffice
for the input office name.java.lang.String[]
getOfficeNames()
Obtains the names of theOffice
instances within thisOfficeFloor
.void
openOfficeFloor()
Opens the OfficeFloor and starts necessaryManagedFunction
instances.
-
-
-
Method Detail
-
openOfficeFloor
void openOfficeFloor() throws java.lang.Exception
Opens the OfficeFloor and starts necessaryManagedFunction
instances.- Throws:
java.lang.Exception
- If fails to open the OfficeFloor.
-
closeOfficeFloor
default void closeOfficeFloor() throws java.lang.Exception
Closes the OfficeFloor. This stops allManagedFunction
instances executing within theOffice
instances and releases all resources.- Throws:
java.lang.Exception
- If fails to close theOfficeFloor
.
-
getOfficeNames
java.lang.String[] getOfficeNames()
Obtains the names of the
Office
instances within thisOfficeFloor
.This allows to dynamically manage this
OfficeFloor
.- Returns:
- Names of the
Office
instances within thisOfficeFloor
.
-
getOffice
Office getOffice(java.lang.String officeName) throws UnknownOfficeException
Obtains theOffice
for the input office name.- Parameters:
officeName
- Name of theOffice
.- Returns:
- Specified
Office
. - Throws:
UnknownOfficeException
- If noOffice
by the name within thisOfficeFloor
.
-
-