Class FilteredChannelFactory

  • All Implemented Interfaces:
    BufferedChannelArrayFactory, BufferedChannelFactory, ChannelArrayFactory, ChannelFactory

    public class FilteredChannelFactory
    extends java.lang.Object
    implements ChannelFactory, ChannelArrayFactory, BufferedChannelFactory, BufferedChannelArrayFactory

    This class is used for constructing Filtered Channels. The objects returned by instances of this class will implement the appropriate Filtered Channel interfaces even though the return types are not declared as being Filtered Channels. This is so that this class can implement the ChannelFactory and ChannelArrayFactory interfaces. Instances of this class can therefore be used in place of the standard channel factory classes.

    A set of read and/or write filters can be specified so that all of the channels created by this factory will have the same buffering properties.

    • Field Detail

      • readFilters

        private Filter[] readFilters
        Read filters to install in channels created by this factory.
      • writeFilters

        private Filter[] writeFilters
        Write filters to install in channels created by this factory.
    • Constructor Detail

      • FilteredChannelFactory

        public FilteredChannelFactory()
        All channels constructed with a Factory constructed with this constructor will default to having no pre-installed filters.
      • FilteredChannelFactory

        public FilteredChannelFactory​(Filter[] readFilters,
                                      Filter[] writeFilters)

        All channels constructed with this Factory instance will have the specified Filter objects inserted into them. The same instances of the filters will be inserted into each channel.

        Either of the parameters may be null if read/write filters are not required.

        Parameters:
        readFilters - optional read filters to install in new channels.
        writeFilters - optional write filters to install in new channels.