net.officefloor.frame.spi.administration.source
Interface AdministratorSource<I,A extends Enum<A>>

All Known Implementing Classes:
AbstractAdministratorSource, ClassAdministratorSource, MockAdministratorSource, TransactionAdministratorSource

public interface AdministratorSource<I,A extends Enum<A>>

Source to obtain a particular type of Administrator.

Implemented by the Administrator provider.

Author:
Daniel Sagenschneider

Method Summary
 Administrator<I,A> createAdministrator()
           Creates a new Administrator.
 AdministratorSourceMetaData<I,A> getMetaData()
           Obtains the meta-data to describe this.
 AdministratorSourceSpecification getSpecification()
           Obtains the specification for this.
 void init(AdministratorSourceContext context)
          Called only once after the AdministratorSource is instantiated.
 

Method Detail

getSpecification

AdministratorSourceSpecification getSpecification()

Obtains the specification for this.

This will be called before any other methods, therefore this method must be able to return the specification immediately after a default constructor instantiation.

Returns:
Specification of this.

init

void init(AdministratorSourceContext context)
          throws Exception
Called only once after the AdministratorSource is instantiated.

Parameters:
context - AdministratorSourceContext to initialise this instance of the AdministratorSource.
Throws:
Exception - Should the AdministratorSource fail to configure itself from the input properties.

getMetaData

AdministratorSourceMetaData<I,A> getMetaData()

Obtains the meta-data to describe this.

This is called after the #init(DutyContext) method and therefore may use the configuration.

This should always return non-null. If there is a problem due to incorrect configuration, the init(AdministratorSourceContext) should indicate this via an exception.

Returns:
Meta-data to describe this.

createAdministrator

Administrator<I,A> createAdministrator()
                                                       throws Throwable

Creates a new Administrator.

Returns:
New Administrator.
Throws:
Throwable - If fails to create the Administrator.


Copyright © 2005-2013. All Rights Reserved.