Class Reference
- All Implemented Interfaces:
Provider<Channel>,ProviderAsStack
Provides a channel by referencing it from a a set of named-channels.
This class extends ChannelProvider to retrieve a channel by its ID from a named
provider. It also offers an option to duplicate the retrieved channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Gets or creates an object of typeT.getId()The ID of the channel to retrieve from the named-provider.booleanIf true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.voidsetDuplicate(boolean duplicate) If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.voidThe ID of the channel to retrieve from the named-provider.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStackMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Reference
Creates a new instance with a specified channel ID.- Parameters:
id- the ID of the channel to retrieve
-
Reference
public Reference()
-
-
Method Details
-
get
Description copied from interface:ProviderGets or creates an object of typeT.- Returns:
- the object returned by the provider.
- Throws:
ProvisionFailedException- if the object cannot be returned.
-
getId
The ID of the channel to retrieve from the named-provider. -
setId
The ID of the channel to retrieve from the named-provider. -
isDuplicate
public boolean isDuplicate()If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.This is a shortcut to avoid embedding beans in a ChannelProviderDuplicate.
-
setDuplicate
public void setDuplicate(boolean duplicate) If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.This is a shortcut to avoid embedding beans in a ChannelProviderDuplicate.
-