public class StandardChannelFactory
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
RiskyChannelFactory
to construct the underlying
raw channels.
Constructor and description |
---|
StandardChannelFactory
() Constructs a new factory. |
Type | Name and description |
---|---|
Any2AnyChannel |
createAny2Any() Constructs and returns an Any2AnyChannel object. |
Any2AnyChannel[] |
createAny2Any(int n) Constructs and returns an array of Any2AnyChannel
objects. |
Any2AnyChannel |
createAny2Any(ChannelDataStore buffer) |
Any2AnyChannel[] |
createAny2Any(ChannelDataStore buffer, int n) |
Any2OneChannel |
createAny2One() Constructs and returns an Any2OneChannel object. |
Any2OneChannel[] |
createAny2One(int n) Constructs and returns an array of Any2OneChannel
objects. |
Any2OneChannel |
createAny2One(ChannelDataStore buffer) |
Any2OneChannel[] |
createAny2One(ChannelDataStore buffer, int n) |
One2AnyChannel |
createOne2Any() Constructs and returns a One2AnyChannel object. |
One2AnyChannel[] |
createOne2Any(int n) Constructs and returns an array of One2AnyChannel
objects. |
One2AnyChannel |
createOne2Any(ChannelDataStore buffer) |
One2AnyChannel[] |
createOne2Any(ChannelDataStore buffer, int n) |
One2OneChannel |
createOne2One() Constructs and returns a One2OneChannel object. |
One2OneChannel[] |
createOne2One(int n) Constructs and returns an array of One2OneChannel
objects. |
One2OneChannel |
createOne2One(ChannelDataStore buffer) |
One2OneChannel[] |
createOne2One(ChannelDataStore buffer, int n) |
static StandardChannelFactory |
getDefaultInstance() Returns a default instance of a channel factory. |
Constructs and returns an Any2AnyChannel
object.
Constructs and returns an array of Any2AnyChannel
objects.
n the
- size of the array of channels.
Constructs and returns a Any2AnyChannel
object which
uses the specified ChannelDataStore
object as a buffer.
The buffer supplied to this method is cloned before it is inserted into the channel.
buffer the
- ChannelDataStore
to use.
Constructs and returns an array of Any2AnyChannel
objects
which use the specified ChannelDataStore
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.
buffer the
- ChannelDataStore
to use.n
- the size of the array of channels. Constructs and returns an Any2OneChannel
object.
Constructs and returns an array of Any2OneChannel
objects.
n the
- size of the array of channels.
Constructs and returns a Any2OneChannel
object which
uses the specified ChannelDataStore
object as a buffer.
The buffer supplied to this method is cloned before it is inserted into the channel.
buffer the
- ChannelDataStore
to use.
Constructs and returns an array of Any2OneChannel
objects
which use the specified ChannelDataStore
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.
buffer the
- ChannelDataStore
to use.n
- the size of the array of channels. Constructs and returns a One2AnyChannel
object.
Constructs and returns an array of One2AnyChannel
objects.
n the
- size of the array of channels.
Constructs and returns a One2AnyChannel
object which
uses the specified ChannelDataStore
object as a buffer.
The buffer supplied to this method is cloned before it is inserted into the channel.
buffer the
- ChannelDataStore
to use.
Constructs and returns an array of One2AnyChannel
objects
which use the specified ChannelDataStore
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.
buffer the
- ChannelDataStore
to use.n
- the size of the array of channels. Constructs and returns a One2OneChannel
object.
Constructs and returns an array of One2OneChannel
objects.
n the
- size of the array of channels.
Constructs and returns a One2OneChannel
object which
uses the specified ChannelDataStore
object as a buffer.
The buffer supplied to this method is cloned before it is inserted into the channel.
buffer the
- ChannelDataStore
to use.
Constructs and returns an array of One2OneChannel
objects
which use the specified ChannelDataStore
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.
buffer the
- ChannelDataStore
to use.n
- the size of the array of channels.Returns a default instance of a channel factory.
JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk