Class ManagedObjectBuilderImpl<O extends Enum<O>,F extends Enum<F>,MS extends ManagedObjectSource<O,F>>
java.lang.Object
net.officefloor.frame.impl.construct.managedobjectsource.ManagedObjectBuilderImpl<O,F,MS>
- All Implemented Interfaces:
ManagedObjectBuilder<F>,ManagedObjectSourceConfiguration<F,MS>
public class ManagedObjectBuilderImpl<O extends Enum<O>,F extends Enum<F>,MS extends ManagedObjectSource<O,F>>
extends Object
implements ManagedObjectBuilder<F>, ManagedObjectSourceConfiguration<F,MS>
Implements the
ManagedObjectBuilder.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionManagedObjectBuilderImpl(String managedObjectSourceName, Class<MS> managedObjectSourceClass) Initiate.ManagedObjectBuilderImpl(String managedObjectSourceName, MS managedObjectSource) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalProfile(String profile) Adds an additional profile.voidaddFunctionEnhancer(ManagedObjectFunctionEnhancer functionEnhancer) Adds aManagedObjectFunctionEnhancer.voidaddProperty(String name, String value) Specifies a property for theManagedObjectSource.String[]Obtains the additional profiles.Obtains theManagedObjectFunctionEnhancerinstances.Obtains theManagedObjectPoolConfigurationfor thisManagedObjectSource.Obtains theManagedObjectSourceinstance to use.Obtains theClassof theManagedObjectSource.Obtains the name of thisManagedObjectSource.Obtains theManagingOfficeConfigurationdetailing theOfficeresponsible for managing thisManagedObjectSource.Obtains theSourcePropertiesto initialise theManagedObjectSource.String[]Obtains the names of theManagedObjectSourceto start up after.String[]Obtains the names of theManagedObjectSourceto start up before.longObtains the timeout to: to source theManagedObjecthave asynchronous operations on theManagedObjectcompletesetManagedObjectPool(ManagedObjectPoolFactory managedObjectPoolFactory) Specifies theManagedObjectPoolFactoryfor thisManagedObject.setManagingOffice(String officeName) Specifies theOfficeto manage thisManagedObject.voidsetTimeout(long timeout) Specifies the timeout to: to source theManagedObjecthave asynchronous operations on theManagedObjectcompletevoidstartupAfter(String managedObjectSourceName) Flags for thisManagedObjectSourceto be started after the specified namedManagedObjectSource.voidstartupBefore(String managedObjectSourceName) Flags for thisManagedObjectSourceto be started before the specified namedManagedObjectSource.
-
Constructor Details
-
ManagedObjectBuilderImpl
Initiate.- Parameters:
managedObjectSourceName- Name of theManagedObjectSource.managedObjectSourceClass-Classof theManagedObjectSource.
-
ManagedObjectBuilderImpl
Initiate.- Parameters:
managedObjectSourceName- Name of theManagedObjectSource.managedObjectSource-ManagedObjectSourceinstance to use.
-
-
Method Details
-
addAdditionalProfile
Description copied from interface:ManagedObjectBuilderAdds an additional profile.- Specified by:
addAdditionalProfilein interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
profile- Additional profile.
-
addProperty
Description copied from interface:ManagedObjectBuilderSpecifies a property for theManagedObjectSource.- Specified by:
addPropertyin interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
name- Name of property.value- Value of property.
-
setManagedObjectPool
public ManagedObjectPoolBuilder setManagedObjectPool(ManagedObjectPoolFactory managedObjectPoolFactory) Description copied from interface:ManagedObjectBuilderSpecifies theManagedObjectPoolFactoryfor thisManagedObject.- Specified by:
setManagedObjectPoolin interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
managedObjectPoolFactory-ManagedObjectPoolFactoryfor thisManagedObject.- Returns:
ManagedObjectPoolBuilder.
-
setTimeout
public void setTimeout(long timeout) Description copied from interface:ManagedObjectBuilderSpecifies the timeout to:- to source the
ManagedObject - have asynchronous operations on the
ManagedObjectcomplete
- Specified by:
setTimeoutin interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
timeout- Timeout.
- to source the
-
setManagingOffice
Description copied from interface:ManagedObjectBuilderSpecifies theOfficeto manage thisManagedObject.- Specified by:
setManagingOfficein interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
officeName- Name of theOffice.- Returns:
ManagingOfficeBuilder.
-
addFunctionEnhancer
Description copied from interface:ManagedObjectBuilderAdds aManagedObjectFunctionEnhancer.- Specified by:
addFunctionEnhancerin interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
functionEnhancer-ManagedObjectFunctionEnhancer.
-
startupBefore
Description copied from interface:ManagedObjectBuilderFlags for thisManagedObjectSourceto be started before the specified namedManagedObjectSource.- Specified by:
startupBeforein interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
managedObjectSourceName- Name ofManagedObjectSourceto be started after thisManagedObjectSource.
-
startupAfter
Description copied from interface:ManagedObjectBuilderFlags for thisManagedObjectSourceto be started after the specified namedManagedObjectSource.- Specified by:
startupAfterin interfaceManagedObjectBuilder<O extends Enum<O>>- Parameters:
managedObjectSourceName- Name ofManagedObjectSourceto be started before thisManagedObjectSource.
-
getManagedObjectSourceName
Description copied from interface:ManagedObjectSourceConfigurationObtains the name of thisManagedObjectSource.- Specified by:
getManagedObjectSourceNamein interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
- Name of this
ManagedObjectSource.
-
getManagingOfficeConfiguration
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagingOfficeConfigurationdetailing theOfficeresponsible for managing thisManagedObjectSource.- Specified by:
getManagingOfficeConfigurationin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
ManagingOfficeConfiguration.
-
getManagedObjectSource
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagedObjectSourceinstance to use.- Specified by:
getManagedObjectSourcein interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
ManagedObjectSourceinstance to use. This may benulland therefore theManagedObjectSourceConfiguration.getManagedObjectSourceClass()should be used to obtain theManagedObjectSource.
-
getManagedObjectSourceClass
Description copied from interface:ManagedObjectSourceConfigurationObtains theClassof theManagedObjectSource.- Specified by:
getManagedObjectSourceClassin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
Classof theManagedObjectSource. Will benullif aManagedObjectSourceinstance is configured.
-
getAdditionalProfiles
Description copied from interface:ManagedObjectSourceConfigurationObtains the additional profiles.- Specified by:
getAdditionalProfilesin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
- Additional profiles.
-
getProperties
Description copied from interface:ManagedObjectSourceConfigurationObtains theSourcePropertiesto initialise theManagedObjectSource.- Specified by:
getPropertiesin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
SourcePropertiesto initialise theManagedObjectSource.
-
getManagedObjectPoolConfiguration
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagedObjectPoolConfigurationfor thisManagedObjectSource.- Specified by:
getManagedObjectPoolConfigurationin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
ManagedObjectPoolConfigurationfor thisManagedObjectSourceornullif not to be pooled.
-
getManagedObjectFunctionEnhancers
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagedObjectFunctionEnhancerinstances.- Specified by:
getManagedObjectFunctionEnhancersin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
ManagedObjectFunctionEnhancerinstances.
-
getTimeout
public long getTimeout()Description copied from interface:ManagedObjectSourceConfigurationObtains the timeout to:- to source the
ManagedObject - have asynchronous operations on the
ManagedObjectcomplete
- Specified by:
getTimeoutin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
- Timeout.
- to source the
-
getStartupBefore
Description copied from interface:ManagedObjectSourceConfigurationObtains the names of theManagedObjectSourceto start up before.- Specified by:
getStartupBeforein interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
- Names of the
ManagedObjectSourceto start up before.
-
getStartupAfter
Description copied from interface:ManagedObjectSourceConfigurationObtains the names of theManagedObjectSourceto start up after.- Specified by:
getStartupAfterin interfaceManagedObjectSourceConfiguration<O extends Enum<O>,F extends Enum<F>> - Returns:
- Names of the
ManagedObjectSourceto start up after.
-