Fork me on GitHub

TeamSource provides the Teams that execute the Jobs within OfficeFloor. Much like teams in offices are responsible for completing certain jobs, so are the Teams provided by the TeamSources.

The name Team comes from the idea that teams within an office are the active individuals ensuring the work is completed, much like a thread pool are active threads processing the functionality of an application. Also much like teams within an office, Teams (thread pools) can be varying in nature: single thread (one person), multi-threaded (a group of people), thread per job (work contracted out), etc.

The ability of OfficeFloor (due to its Job Based Architecture) to allow Jobs to be assigned to Teams and the Teams to be structured for the Jobs they are assigned, gives architects significant flexibility to tune the efficiency of applications. Furthermore, the greatest flexibility for the architect is that the assigning of Jobs to Teams and the selection of Teams can be left until assembly and deployment of the application. This means that rather than using significant effort to decide on the correct threading model during design (that can incur 'expensive' changes later if incorrect), the developers can first code up the functionality that results in identifying the finer details of the application. Once the finer details of the application are understood a threading model can then be selected appropriately.

Writing your own TeamSource implementation

Before writing your own implementation please have a quick check as there may be an implementation already existing that suits your requirements.

If however, you have found nothing that meets your requirements you can write your own implementation. The following table provides starting points for writing your own implementation.

Class Description
net.officefloor.frame.spi.team.source.TeamSource This is the interface that all TeamSource implementations must implement
net.officefloor.frame.spi.team.source.impl.AbstractTeamSource Provides abstract functionality to simplify implementing a TeamSource
net.officefloor.compile.TeamSourceService Allows using the ServiceLoader functionality to provide additional meta-data about your TeamSource. Providing this is optional.

Also see the graphical editors for details on how you can also provide customised graphical configuration of your TeamSource.