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 void
addAdditionalProfile(java.lang.String profile)
Adds an additional profile.void
addProperty(java.lang.String name, java.lang.String value)
Specifies a property for theManagedObjectSource
.java.lang.String[]
getAdditionalProfiles()
Obtains the additional profiles.ManagedObjectPoolConfiguration
getManagedObjectPoolConfiguration()
Obtains theManagedObjectPoolConfiguration
for thisManagedObjectSource
.MS
getManagedObjectSource()
Obtains theManagedObjectSource
instance to use.java.lang.Class<MS>
getManagedObjectSourceClass()
Obtains theClass
of theManagedObjectSource
.java.lang.String
getManagedObjectSourceName()
Obtains the name of thisManagedObjectSource
.ManagingOfficeConfiguration<F>
getManagingOfficeConfiguration()
Obtains theManagingOfficeConfiguration
detailing theOffice
responsible for managing thisManagedObjectSource
.SourceProperties
getProperties()
Obtains theSourceProperties
to initialise theManagedObjectSource
.long
getTimeout()
Obtains the timeout to: to source theManagedObject
have asynchronous operations on theManagedObject
completeManagedObjectPoolBuilder
setManagedObjectPool(ManagedObjectPoolFactory managedObjectPoolFactory)
Specifies theManagedObjectPoolFactory
for thisManagedObject
.ManagingOfficeBuilder<F>
setManagingOffice(java.lang.String officeName)
Specifies theOffice
to manage thisManagedObject
.void
setTimeout(long timeout)
Specifies the timeout to: to source theManagedObject
have asynchronous operations on theManagedObject
complete
-
-
-
Constructor Detail
-
ManagedObjectBuilderImpl
public ManagedObjectBuilderImpl(java.lang.String managedObjectSourceName, java.lang.Class<MS> managedObjectSourceClass)
Initiate.- Parameters:
managedObjectSourceName
- Name of theManagedObjectSource
.managedObjectSourceClass
-Class
of theManagedObjectSource
.
-
ManagedObjectBuilderImpl
public ManagedObjectBuilderImpl(java.lang.String managedObjectSourceName, MS managedObjectSource)
Initiate.- Parameters:
managedObjectSourceName
- Name of theManagedObjectSource
.managedObjectSource
-ManagedObjectSource
instance to use.
-
-
Method Detail
-
addAdditionalProfile
public void addAdditionalProfile(java.lang.String profile)
Description copied from interface:ManagedObjectBuilder
Adds an additional profile.- Specified by:
addAdditionalProfile
in 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:ManagedObjectBuilder
Specifies a property for theManagedObjectSource
.- Specified by:
addProperty
in 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:ManagedObjectBuilder
Specifies theManagedObjectPoolFactory
for thisManagedObject
.- Specified by:
setManagedObjectPool
in interfaceManagedObjectBuilder<O extends java.lang.Enum<O>>
- Parameters:
managedObjectPoolFactory
-ManagedObjectPoolFactory
for thisManagedObject
.- Returns:
ManagedObjectPoolBuilder
.
-
setTimeout
public void setTimeout(long timeout)
Description copied from interface:ManagedObjectBuilder
Specifies the timeout to:- to source the
ManagedObject
- have asynchronous operations on the
ManagedObject
complete
- Specified by:
setTimeout
in 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:ManagedObjectBuilder
Specifies theOffice
to manage thisManagedObject
.- Specified by:
setManagingOffice
in interfaceManagedObjectBuilder<O extends java.lang.Enum<O>>
- Parameters:
officeName
- Name of theOffice
.- Returns:
ManagingOfficeBuilder
.
-
getManagedObjectSourceName
public java.lang.String getManagedObjectSourceName()
Description copied from interface:ManagedObjectSourceConfiguration
Obtains the name of thisManagedObjectSource
.- Specified by:
getManagedObjectSourceName
in 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:ManagedObjectSourceConfiguration
Obtains theManagingOfficeConfiguration
detailing theOffice
responsible for managing thisManagedObjectSource
.- Specified by:
getManagingOfficeConfiguration
in interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
ManagingOfficeConfiguration
.
-
getManagedObjectSource
public MS getManagedObjectSource()
Description copied from interface:ManagedObjectSourceConfiguration
Obtains theManagedObjectSource
instance to use.- Specified by:
getManagedObjectSource
in interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
ManagedObjectSource
instance to use. This may benull
and therefore theManagedObjectSourceConfiguration.getManagedObjectSourceClass()
should be used to obtain theManagedObjectSource
.
-
getManagedObjectSourceClass
public java.lang.Class<MS> getManagedObjectSourceClass()
Description copied from interface:ManagedObjectSourceConfiguration
Obtains theClass
of theManagedObjectSource
.- Specified by:
getManagedObjectSourceClass
in interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
Class
of theManagedObjectSource
. Will benull
if aManagedObjectSource
instance is configured.
-
getAdditionalProfiles
public java.lang.String[] getAdditionalProfiles()
Description copied from interface:ManagedObjectSourceConfiguration
Obtains the additional profiles.- Specified by:
getAdditionalProfiles
in interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Additional profiles.
-
getProperties
public SourceProperties getProperties()
Description copied from interface:ManagedObjectSourceConfiguration
Obtains theSourceProperties
to initialise theManagedObjectSource
.- Specified by:
getProperties
in interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
SourceProperties
to initialise theManagedObjectSource
.
-
getManagedObjectPoolConfiguration
public ManagedObjectPoolConfiguration getManagedObjectPoolConfiguration()
Description copied from interface:ManagedObjectSourceConfiguration
Obtains theManagedObjectPoolConfiguration
for thisManagedObjectSource
.- Specified by:
getManagedObjectPoolConfiguration
in interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
ManagedObjectPoolConfiguration
for thisManagedObjectSource
ornull
if not to be pooled.
-
getTimeout
public long getTimeout()
Description copied from interface:ManagedObjectSourceConfiguration
Obtains the timeout to:- to source the
ManagedObject
- have asynchronous operations on the
ManagedObject
complete
- Specified by:
getTimeout
in interfaceManagedObjectSourceConfiguration<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Timeout.
- to source the
-
-