Class ManagedObjectBuilderImpl<O extends java.lang.Enum<O>,F extends java.lang.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 java.lang.Enum<O>,F extends java.lang.Enum<F>,MS extends ManagedObjectSource<O,F>> extends java.lang.Object implements ManagedObjectBuilder<F>, ManagedObjectSourceConfiguration<F,MS>
Implements theManagedObjectBuilder.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectBuilderImpl(java.lang.String managedObjectSourceName, java.lang.Class<MS> managedObjectSourceClass)Initiate.ManagedObjectBuilderImpl(java.lang.String managedObjectSourceName, MS managedObjectSource)Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalProfile(java.lang.String profile)Adds an additional profile.voidaddFunctionEnhancer(ManagedObjectFunctionEnhancer functionEnhancer)Adds aManagedObjectFunctionEnhancer.voidaddProperty(java.lang.String name, java.lang.String value)Specifies a property for theManagedObjectSource.java.lang.String[]getAdditionalProfiles()Obtains the additional profiles.ManagedObjectFunctionEnhancer[]getManagedObjectFunctionEnhancers()Obtains theManagedObjectFunctionEnhancerinstances.ManagedObjectPoolConfigurationgetManagedObjectPoolConfiguration()Obtains theManagedObjectPoolConfigurationfor thisManagedObjectSource.MSgetManagedObjectSource()Obtains theManagedObjectSourceinstance to use.java.lang.Class<MS>getManagedObjectSourceClass()Obtains theClassof theManagedObjectSource.java.lang.StringgetManagedObjectSourceName()Obtains the name of thisManagedObjectSource.ManagingOfficeConfiguration<F>getManagingOfficeConfiguration()Obtains theManagingOfficeConfigurationdetailing theOfficeresponsible for managing thisManagedObjectSource.SourcePropertiesgetProperties()Obtains theSourcePropertiesto initialise theManagedObjectSource.java.lang.String[]getStartupAfter()Obtains the names of theManagedObjectSourceto start up after.java.lang.String[]getStartupBefore()Obtains the names of theManagedObjectSourceto start up before.longgetTimeout()Obtains the timeout to: to source theManagedObjecthave asynchronous operations on theManagedObjectcompleteManagedObjectPoolBuildersetManagedObjectPool(ManagedObjectPoolFactory managedObjectPoolFactory)Specifies theManagedObjectPoolFactoryfor thisManagedObject.ManagingOfficeBuilder<F>setManagingOffice(java.lang.String officeName)Specifies theOfficeto manage thisManagedObject.voidsetTimeout(long timeout)Specifies the timeout to: to source theManagedObjecthave asynchronous operations on theManagedObjectcompletevoidstartupAfter(java.lang.String managedObjectSourceName)Flags for thisManagedObjectSourceto be started after the specified namedManagedObjectSource.voidstartupBefore(java.lang.String managedObjectSourceName)Flags for thisManagedObjectSourceto be started before the specified namedManagedObjectSource.
-
-
-
Constructor Detail
-
ManagedObjectBuilderImpl
public ManagedObjectBuilderImpl(java.lang.String managedObjectSourceName, java.lang.Class<MS> managedObjectSourceClass)Initiate.- Parameters:
managedObjectSourceName- Name of theManagedObjectSource.managedObjectSourceClass-Classof theManagedObjectSource.
-
ManagedObjectBuilderImpl
public ManagedObjectBuilderImpl(java.lang.String managedObjectSourceName, MS managedObjectSource)Initiate.- Parameters:
managedObjectSourceName- Name of theManagedObjectSource.managedObjectSource-ManagedObjectSourceinstance to use.
-
-
Method Detail
-
addAdditionalProfile
public void addAdditionalProfile(java.lang.String profile)
Description copied from interface:ManagedObjectBuilderAdds an additional profile.- Specified by:
addAdditionalProfilein interfaceManagedObjectBuilder<O extends java.lang.Enum<O>>- Parameters:
profile- Additional profile.
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)Description copied from interface:ManagedObjectBuilderSpecifies a property for theManagedObjectSource.- Specified by:
addPropertyin interfaceManagedObjectBuilder<O extends java.lang.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 java.lang.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 java.lang.Enum<O>>- Parameters:
timeout- Timeout.
- to source the
-
setManagingOffice
public ManagingOfficeBuilder<F> setManagingOffice(java.lang.String officeName)
Description copied from interface:ManagedObjectBuilderSpecifies theOfficeto manage thisManagedObject.- Specified by:
setManagingOfficein interfaceManagedObjectBuilder<O extends java.lang.Enum<O>>- Parameters:
officeName- Name of theOffice.- Returns:
ManagingOfficeBuilder.
-
addFunctionEnhancer
public void addFunctionEnhancer(ManagedObjectFunctionEnhancer functionEnhancer)
Description copied from interface:ManagedObjectBuilderAdds aManagedObjectFunctionEnhancer.- Specified by:
addFunctionEnhancerin interfaceManagedObjectBuilder<O extends java.lang.Enum<O>>- Parameters:
functionEnhancer-ManagedObjectFunctionEnhancer.
-
startupBefore
public void startupBefore(java.lang.String managedObjectSourceName)
Description copied from interface:ManagedObjectBuilderFlags for thisManagedObjectSourceto be started before the specified namedManagedObjectSource.- Specified by:
startupBeforein interfaceManagedObjectBuilder<O extends java.lang.Enum<O>>- Parameters:
managedObjectSourceName- Name ofManagedObjectSourceto be started after thisManagedObjectSource.
-
startupAfter
public void startupAfter(java.lang.String managedObjectSourceName)
Description copied from interface:ManagedObjectBuilderFlags for thisManagedObjectSourceto be started after the specified namedManagedObjectSource.- Specified by:
startupAfterin interfaceManagedObjectBuilder<O extends java.lang.Enum<O>>- Parameters:
managedObjectSourceName- Name ofManagedObjectSourceto be started before thisManagedObjectSource.
-
getManagedObjectSourceName
public java.lang.String getManagedObjectSourceName()
Description copied from interface:ManagedObjectSourceConfigurationObtains the name of thisManagedObjectSource.- Specified by:
getManagedObjectSourceNamein interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Name of this
ManagedObjectSource.
-
getManagingOfficeConfiguration
public ManagingOfficeConfiguration<F> getManagingOfficeConfiguration()
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagingOfficeConfigurationdetailing theOfficeresponsible for managing thisManagedObjectSource.- Specified by:
getManagingOfficeConfigurationin interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
ManagingOfficeConfiguration.
-
getManagedObjectSource
public MS getManagedObjectSource()
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagedObjectSourceinstance to use.- Specified by:
getManagedObjectSourcein interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
ManagedObjectSourceinstance to use. This may benulland therefore theManagedObjectSourceConfiguration.getManagedObjectSourceClass()should be used to obtain theManagedObjectSource.
-
getManagedObjectSourceClass
public java.lang.Class<MS> getManagedObjectSourceClass()
Description copied from interface:ManagedObjectSourceConfigurationObtains theClassof theManagedObjectSource.- Specified by:
getManagedObjectSourceClassin interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
Classof theManagedObjectSource. Will benullif aManagedObjectSourceinstance is configured.
-
getAdditionalProfiles
public java.lang.String[] getAdditionalProfiles()
Description copied from interface:ManagedObjectSourceConfigurationObtains the additional profiles.- Specified by:
getAdditionalProfilesin interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Additional profiles.
-
getProperties
public SourceProperties getProperties()
Description copied from interface:ManagedObjectSourceConfigurationObtains theSourcePropertiesto initialise theManagedObjectSource.- Specified by:
getPropertiesin interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
SourcePropertiesto initialise theManagedObjectSource.
-
getManagedObjectPoolConfiguration
public ManagedObjectPoolConfiguration getManagedObjectPoolConfiguration()
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagedObjectPoolConfigurationfor thisManagedObjectSource.- Specified by:
getManagedObjectPoolConfigurationin interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
ManagedObjectPoolConfigurationfor thisManagedObjectSourceornullif not to be pooled.
-
getManagedObjectFunctionEnhancers
public ManagedObjectFunctionEnhancer[] getManagedObjectFunctionEnhancers()
Description copied from interface:ManagedObjectSourceConfigurationObtains theManagedObjectFunctionEnhancerinstances.- Specified by:
getManagedObjectFunctionEnhancersin interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.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 java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Timeout.
- to source the
-
getStartupBefore
public java.lang.String[] getStartupBefore()
Description copied from interface:ManagedObjectSourceConfigurationObtains the names of theManagedObjectSourceto start up before.- Specified by:
getStartupBeforein interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Names of the
ManagedObjectSourceto start up before.
-
getStartupAfter
public java.lang.String[] getStartupAfter()
Description copied from interface:ManagedObjectSourceConfigurationObtains the names of theManagedObjectSourceto start up after.- Specified by:
getStartupAfterin interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Names of the
ManagedObjectSourceto start up after.
-
-