Class FilteredChannelFactory
- All Implemented Interfaces:
BufferedChannelArrayFactory, BufferedChannelFactory, ChannelArrayFactory, ChannelFactory
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 Summary
FieldsModifier and TypeFieldDescriptionprivate StandardChannelFactoryUnderlying factory for creating the base channels.private Filter[]Read filters to install in channels created by this factory.private Filter[]Write filters to install in channels created by this factory. -
Constructor Summary
ConstructorsConstructorDescriptionAll channels constructed with a Factory constructed with this constructor will default to having no pre-installed filters.FilteredChannelFactory(Filter[] readFilters, Filter[] writeFilters) All channels constructed with this Factory instance will have the specifiedFilterobjects inserted into them. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new Any2Any channel with the filtering options set for this factory.createAny2Any(int n) Constructs and returns an array ofAny2AnyChannelobjects.createAny2Any(ChannelDataStore buffer) Creates a new Any2Any channel with the filtering options set for this factory and the specified data buffer.createAny2Any(ChannelDataStore buffer, int n) Constructs and returns an array ofAny2AnyChannelobjects with a given buffering behaviour.Creates a new Any2One channel with the filtering options set for this factory.createAny2One(int n) Constructs and returns an array ofAny2OneChannelobjects.createAny2One(ChannelDataStore buffer) Creates a new Any2One channel with the filtering options set for this factory and the specified data buffer.createAny2One(ChannelDataStore buffer, int n) Constructs and returns an array ofAny2OneChannelobjects with a given buffering behaviour.Creates a new One2Any channel with the filtering options set for this factory.createOne2Any(int n) Constructs and returns an array ofOne2AnyChannelobjects.createOne2Any(ChannelDataStore buffer) Creates a new One2Any channel with the filtering options set for this factory and the specified data buffer.createOne2Any(ChannelDataStore buffer, int n) Constructs and returns an array ofOne2AnyChannelobjects with a given buffering behaviour.Creates a new One2One channel with the filtering options set for this factory.createOne2One(int n) Constructs and returns an array ofOne2OneChannelobjects.createOne2One(ChannelDataStore buffer) Creates a new One2One channel with the filtering options set for this factory and the specified data buffer.createOne2One(ChannelDataStore buffer, int n) Constructs and returns an array ofOne2OneChannelobjects with a given buffering behaviour.private voidinstallFilters(ReadFiltered readFiltered, WriteFiltered writeFiltered) Installs the filters currently set for this factory into the read/write channel ends supplied.
-
Field Details
-
factory
Underlying factory for creating the base channels. -
readFilters
Read filters to install in channels created by this factory. -
writeFilters
Write filters to install in channels created by this factory.
-
-
Constructor Details
-
FilteredChannelFactory
public FilteredChannelFactory()All channels constructed with a Factory constructed with this constructor will default to having no pre-installed filters. -
FilteredChannelFactory
All channels constructed with this Factory instance will have the specified
Filterobjects inserted into them. The same instances of the filters will be inserted into each channel.Either of the parameters may be
nullif 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.
-
-
Method Details
-
installFilters
Installs the filters currently set for this factory into the read/write channel ends supplied.- Parameters:
readFiltered- optional control interface for the read end of a filtered channel.writeFiltered- optional control interface for the write end of a filtered channel.
-
createOne2One
Creates a new One2One channel with the filtering options set for this factory.- Specified by:
createOne2Onein interfaceChannelFactory- Returns:
- the created channel with the filters installed.
-
createAny2One
Creates a new Any2One channel with the filtering options set for this factory.- Specified by:
createAny2Onein interfaceChannelFactory- Returns:
- the created channel with the filters installed.
-
createOne2Any
Creates a new One2Any channel with the filtering options set for this factory.- Specified by:
createOne2Anyin interfaceChannelFactory- Returns:
- the created channel with the filters installed.
-
createAny2Any
Creates a new Any2Any channel with the filtering options set for this factory.- Specified by:
createAny2Anyin interfaceChannelFactory- Returns:
- the created channel with the filters installed.
-
createOne2One
Constructs and returns an array ofOne2OneChannelobjects.- Specified by:
createOne2Onein interfaceChannelArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createAny2One
Constructs and returns an array ofAny2OneChannelobjects.- Specified by:
createAny2Onein interfaceChannelArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createOne2Any
Constructs and returns an array ofOne2AnyChannelobjects.- Specified by:
createOne2Anyin interfaceChannelArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createAny2Any
Constructs and returns an array ofAny2AnyChannelobjects.- Specified by:
createAny2Anyin interfaceChannelArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createOne2One
Creates a new One2One channel with the filtering options set for this factory and the specified data buffer.- Specified by:
createOne2Onein interfaceBufferedChannelFactory- Parameters:
buffer- the buffer implementation to use.- Returns:
- the created filtered channel.
-
createAny2One
Creates a new Any2One channel with the filtering options set for this factory and the specified data buffer.- Specified by:
createAny2Onein interfaceBufferedChannelFactory- Parameters:
buffer- the buffer implementation to use.- Returns:
- the created filtered channel.
-
createOne2Any
Creates a new One2Any channel with the filtering options set for this factory and the specified data buffer.- Specified by:
createOne2Anyin interfaceBufferedChannelFactory- Parameters:
buffer- the buffer implementation to use.- Returns:
- the created filtered channel.
-
createAny2Any
Creates a new Any2Any channel with the filtering options set for this factory and the specified data buffer.- Specified by:
createAny2Anyin interfaceBufferedChannelFactory- Parameters:
buffer- the buffer implementation to use.- Returns:
- the created filtered channel.
-
createOne2One
Constructs and returns an array ofOne2OneChannelobjects with a given buffering behaviour.- Specified by:
createOne2Onein interfaceBufferedChannelArrayFactory- Parameters:
buffer- the buffer implementation to use.n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createAny2One
Constructs and returns an array ofAny2OneChannelobjects with a given buffering behaviour.- Specified by:
createAny2Onein interfaceBufferedChannelArrayFactory- Parameters:
buffer- the buffer implementation to use.n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createOne2Any
Constructs and returns an array ofOne2AnyChannelobjects with a given buffering behaviour.- Specified by:
createOne2Anyin interfaceBufferedChannelArrayFactory- Parameters:
buffer- the buffer implementation to use.n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createAny2Any
Constructs and returns an array ofAny2AnyChannelobjects with a given buffering behaviour.- Specified by:
createAny2Anyin interfaceBufferedChannelArrayFactory- Parameters:
buffer- the buffer implementation to use.n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-