All Implemented Interfaces:
Provider<Channel>, ProviderAsStack

public class FromStack extends ChannelProvider
Extracts a channel from a provider of a stack.

This class extends ChannelProvider to provide a single channel from a stack, which can be specified either by a provider ID or directly as a ProviderAsStack.

  • Constructor Details

    • FromStack

      public FromStack(ProviderAsStack stack)
      Creates a new instance with a specified stack provider.
      Parameters:
      stack - the ProviderAsStack to use for providing the stack
    • FromStack

      public FromStack()
  • Method Details

    • checkMisconfigured

      public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
      Description copied from class: AnchorBean
      Checks that a bean's properties conform to expectations.
      Overrides:
      checkMisconfigured in class AnchorBean<ChannelProvider>
      Parameters:
      defaultInstances - all available default instances if the DefaultInstance annotation is used
      Throws:
      BeanMisconfiguredException - if the bean has not been configured properly as XML
    • 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.
    • getChannelIndex

      public int getChannelIndex()
      The index of the channel to extract from the stack.
    • setChannelIndex

      public void setChannelIndex(int channelIndex)
      The index of the channel to extract from the stack.
    • getStackProviderID

      public String getStackProviderID()
      Specifies the ID of an existing stack. Either this must be specified or else stack must be specified.
    • setStackProviderID

      public void setStackProviderID(String stackProviderID)
      Specifies the ID of an existing stack. Either this must be specified or else stack must be specified.
    • getStack

      public ProviderAsStack getStack()
      Provides a stack. Either this must be specified or else stackProviderID must be specified.
    • setStack

      public void setStack(ProviderAsStack stack)
      Provides a stack. Either this must be specified or else stackProviderID must be specified.