Class StandardChannelIntFactory
- All Implemented Interfaces:
BufferedChannelIntArrayFactory
,BufferedChannelIntFactory
,ChannelIntArrayFactory
,ChannelIntFactory
This class acts as a Factory for creating channels. It can create non-buffered and buffered channels and also arrays of non-buffered and buffered channels.
The Channel objects created by this Factory are formed of
separate objects for the read and write ends. Therefore the
ChannelInput
object cannot be cast into the
ChannelOutput
object and vice-versa.
The current implementation uses an instance of the
RiskyChannelIntFactory
to construct the underlying
raw channels.
- Author:
- Quickstone Technologies Limited
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConstructs and returns anAny2AnyChannelInt
object.createAny2Any
(int n) Constructs and returns an array ofAny2AnyChannelInt
objects.createAny2Any
(ChannelDataStoreInt buffer) Constructs and returns aAny2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.createAny2Any
(ChannelDataStoreInt buffer, int n) Constructs and returns an array ofAny2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.Constructs and returns anAny2OneChannelInt
object.createAny2One
(int n) Constructs and returns an array ofAny2OneChannelInt
objects.createAny2One
(ChannelDataStoreInt buffer) Constructs and returns aAny2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.createAny2One
(ChannelDataStoreInt buffer, int n) Constructs and returns an array ofAny2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.Constructs and returns aOne2AnyChannelInt
object.createOne2Any
(int n) Constructs and returns an array ofOne2AnyChannelInt
objects.createOne2Any
(ChannelDataStoreInt buffer) Constructs and returns aOne2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.createOne2Any
(ChannelDataStoreInt buffer, int n) Constructs and returns an array ofOne2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.Constructs and returns aOne2OneChannelInt
object.createOne2One
(int n) Constructs and returns an array ofOne2OneChannelInt
objects.createOne2One
(ChannelDataStoreInt buffer) Constructs and returns aOne2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.createOne2One
(ChannelDataStoreInt buffer, int n) Constructs and returns an array ofOne2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.
-
Constructor Details
-
StandardChannelIntFactory
public StandardChannelIntFactory()Constructs a new factory.
-
-
Method Details
-
createOne2One
Constructs and returns aOne2OneChannelInt
object.- Specified by:
createOne2One
in interfaceChannelIntFactory
- Returns:
- the channel object.
- See Also:
-
createAny2One
Constructs and returns anAny2OneChannelInt
object.- Specified by:
createAny2One
in interfaceChannelIntFactory
- Returns:
- the channel object.
- See Also:
-
createOne2Any
Constructs and returns aOne2AnyChannelInt
object.- Specified by:
createOne2Any
in interfaceChannelIntFactory
- Returns:
- the channel object.
- See Also:
-
createAny2Any
Constructs and returns anAny2AnyChannelInt
object.- Specified by:
createAny2Any
in interfaceChannelIntFactory
- Returns:
- the channel object.
- See Also:
-
createOne2One
Constructs and returns an array ofOne2OneChannelInt
objects.- Specified by:
createOne2One
in interfaceChannelIntArrayFactory
- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createAny2One
Constructs and returns an array ofAny2OneChannelInt
objects.- Specified by:
createAny2One
in interfaceChannelIntArrayFactory
- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createOne2Any
Constructs and returns an array ofOne2AnyChannelInt
objects.- Specified by:
createOne2Any
in interfaceChannelIntArrayFactory
- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createAny2Any
Constructs and returns an array ofAny2AnyChannelInt
objects.- Specified by:
createAny2Any
in interfaceChannelIntArrayFactory
- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
-
createOne2One
Constructs and returns a
One2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createOne2One
in interfaceBufferedChannelIntFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
-
createAny2One
Constructs and returns a
Any2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createAny2One
in interfaceBufferedChannelIntFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
-
createOne2Any
Constructs and returns a
One2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createOne2Any
in interfaceBufferedChannelIntFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
-
createAny2Any
Constructs and returns a
Any2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createAny2Any
in interfaceBufferedChannelIntFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
-
createOne2One
Constructs and returns an array of
One2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel. This is why an array of buffers is not required.
- Specified by:
createOne2One
in interfaceBufferedChannelIntArrayFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
-
createAny2One
Constructs and returns an array of
Any2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel. This is why an array of buffers is not required.
- Specified by:
createAny2One
in interfaceBufferedChannelIntArrayFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
-
createOne2Any
Constructs and returns an array of
One2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel. This is why an array of buffers is not required.
- Specified by:
createOne2Any
in interfaceBufferedChannelIntArrayFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
-
createAny2Any
Constructs and returns an array of
Any2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel. This is why an array of buffers is not required.
- Specified by:
createAny2Any
in interfaceBufferedChannelIntArrayFactory
- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
-