All Implemented Interfaces:
Provider<Channel>, ProviderAsStack

public class Reference extends ChannelProvider
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 Details

    • Reference

      public Reference(String id)
      Creates a new instance with a specified channel ID.
      Parameters:
      id - the ID of the channel to retrieve
    • Reference

      public Reference()
  • Method Details

    • get

      public Channel get() throws ProvisionFailedException
      Description copied from interface: Provider
      Gets or creates an object of type T.
      Returns:
      the object returned by the provider.
      Throws:
      ProvisionFailedException - if the object cannot be returned.
    • getId

      public String getId()
      The ID of the channel to retrieve from the named-provider.
    • setId

      public void setId(String id)
      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.