Class StandardChannelIntFactory
- java.lang.Object
-
- org.jcsp.lang.StandardChannelIntFactory
-
- All Implemented Interfaces:
BufferedChannelIntArrayFactory,BufferedChannelIntFactory,ChannelIntArrayFactory,ChannelIntFactory
public class StandardChannelIntFactory extends java.lang.Object implements ChannelIntFactory, ChannelIntArrayFactory, BufferedChannelIntFactory, BufferedChannelIntArrayFactory
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
ChannelInputobject cannot be cast into theChannelOutputobject and vice-versa.The current implementation uses an instance of the
RiskyChannelIntFactoryto construct the underlying raw channels.
-
-
Constructor Summary
Constructors Constructor Description StandardChannelIntFactory()Constructs a new factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Any2AnyChannelIntcreateAny2Any()Constructs and returns anAny2AnyChannelIntobject.Any2AnyChannelInt[]createAny2Any(int n)Constructs and returns an array ofAny2AnyChannelIntobjects.Any2AnyChannelIntcreateAny2Any(ChannelDataStoreInt buffer)Constructs and returns aAny2AnyChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.Any2AnyChannelInt[]createAny2Any(ChannelDataStoreInt buffer, int n)Constructs and returns an array ofAny2AnyChannelIntobjects which use the specifiedChannelDataStoreIntobject as a buffer.Any2OneChannelIntcreateAny2One()Constructs and returns anAny2OneChannelIntobject.Any2OneChannelInt[]createAny2One(int n)Constructs and returns an array ofAny2OneChannelIntobjects.Any2OneChannelIntcreateAny2One(ChannelDataStoreInt buffer)Constructs and returns aAny2OneChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.Any2OneChannelInt[]createAny2One(ChannelDataStoreInt buffer, int n)Constructs and returns an array ofAny2OneChannelIntobjects which use the specifiedChannelDataStoreIntobject as a buffer.One2AnyChannelIntcreateOne2Any()Constructs and returns aOne2AnyChannelIntobject.One2AnyChannelInt[]createOne2Any(int n)Constructs and returns an array ofOne2AnyChannelIntobjects.One2AnyChannelIntcreateOne2Any(ChannelDataStoreInt buffer)Constructs and returns aOne2AnyChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.One2AnyChannelInt[]createOne2Any(ChannelDataStoreInt buffer, int n)Constructs and returns an array ofOne2AnyChannelIntobjects which use the specifiedChannelDataStoreIntobject as a buffer.One2OneChannelIntcreateOne2One()Constructs and returns aOne2OneChannelIntobject.One2OneChannelInt[]createOne2One(int n)Constructs and returns an array ofOne2OneChannelIntobjects.One2OneChannelIntcreateOne2One(ChannelDataStoreInt buffer)Constructs and returns aOne2OneChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.One2OneChannelInt[]createOne2One(ChannelDataStoreInt buffer, int n)Constructs and returns an array ofOne2OneChannelIntobjects which use the specifiedChannelDataStoreIntobject as a buffer.
-
-
-
Method Detail
-
createOne2One
public One2OneChannelInt createOne2One()
Constructs and returns aOne2OneChannelIntobject.- Specified by:
createOne2Onein interfaceChannelIntFactory- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createOne2One()
-
createAny2One
public Any2OneChannelInt createAny2One()
Constructs and returns anAny2OneChannelIntobject.- Specified by:
createAny2Onein interfaceChannelIntFactory- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createAny2One()
-
createOne2Any
public One2AnyChannelInt createOne2Any()
Constructs and returns aOne2AnyChannelIntobject.- Specified by:
createOne2Anyin interfaceChannelIntFactory- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createOne2Any()
-
createAny2Any
public Any2AnyChannelInt createAny2Any()
Constructs and returns anAny2AnyChannelIntobject.- Specified by:
createAny2Anyin interfaceChannelIntFactory- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createAny2Any()
-
createOne2One
public One2OneChannelInt[] createOne2One(int n)
Constructs and returns an array ofOne2OneChannelIntobjects.- Specified by:
createOne2Onein interfaceChannelIntArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createOne2One(int)
-
createAny2One
public Any2OneChannelInt[] createAny2One(int n)
Constructs and returns an array ofAny2OneChannelIntobjects.- Specified by:
createAny2Onein interfaceChannelIntArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createAny2One(int)
-
createOne2Any
public One2AnyChannelInt[] createOne2Any(int n)
Constructs and returns an array ofOne2AnyChannelIntobjects.- Specified by:
createOne2Anyin interfaceChannelIntArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createOne2Any(int)
-
createAny2Any
public Any2AnyChannelInt[] createAny2Any(int n)
Constructs and returns an array ofAny2AnyChannelIntobjects.- Specified by:
createAny2Anyin interfaceChannelIntArrayFactory- Parameters:
n- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createAny2Any(int)
-
createOne2One
public One2OneChannelInt createOne2One(ChannelDataStoreInt buffer)
Constructs and returns a
One2OneChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createOne2Onein interfaceBufferedChannelIntFactory- Parameters:
buffer- theChannelDataStoreIntto use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createOne2One(org.jcsp.util.ints.ChannelDataStoreInt),ChannelDataStoreInt
-
createAny2One
public Any2OneChannelInt createAny2One(ChannelDataStoreInt buffer)
Constructs and returns a
Any2OneChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createAny2Onein interfaceBufferedChannelIntFactory- Parameters:
buffer- theChannelDataStoreIntto use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createAny2One(org.jcsp.util.ints.ChannelDataStoreInt),ChannelDataStoreInt
-
createOne2Any
public One2AnyChannelInt createOne2Any(ChannelDataStoreInt buffer)
Constructs and returns a
One2AnyChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createOne2Anyin interfaceBufferedChannelIntFactory- Parameters:
buffer- theChannelDataStoreIntto use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createOne2Any(org.jcsp.util.ints.ChannelDataStoreInt),ChannelDataStoreInt
-
createAny2Any
public Any2AnyChannelInt createAny2Any(ChannelDataStoreInt buffer)
Constructs and returns a
Any2AnyChannelIntobject which uses the specifiedChannelDataStoreIntobject as a buffer.The buffer supplied to this method is cloned before it is inserted into the channel.
- Specified by:
createAny2Anyin interfaceBufferedChannelIntFactory- Parameters:
buffer- theChannelDataStoreIntto use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createAny2Any(org.jcsp.util.ints.ChannelDataStoreInt),ChannelDataStoreInt
-
createOne2One
public One2OneChannelInt[] createOne2One(ChannelDataStoreInt buffer, int n)
Constructs and returns an array of
One2OneChannelIntobjects which use the specifiedChannelDataStoreIntobject 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:
createOne2Onein interfaceBufferedChannelIntArrayFactory- Parameters:
buffer- theChannelDataStoreIntto use.n- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createOne2One(org.jcsp.util.ints.ChannelDataStoreInt,int),ChannelDataStoreInt
-
createAny2One
public Any2OneChannelInt[] createAny2One(ChannelDataStoreInt buffer, int n)
Constructs and returns an array of
Any2OneChannelIntobjects which use the specifiedChannelDataStoreIntobject 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:
createAny2Onein interfaceBufferedChannelIntArrayFactory- Parameters:
buffer- theChannelDataStoreIntto use.n- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createAny2One(org.jcsp.util.ints.ChannelDataStoreInt,int),ChannelDataStoreInt
-
createOne2Any
public One2AnyChannelInt[] createOne2Any(ChannelDataStoreInt buffer, int n)
Constructs and returns an array of
One2AnyChannelIntobjects which use the specifiedChannelDataStoreIntobject 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:
createOne2Anyin interfaceBufferedChannelIntArrayFactory- Parameters:
buffer- theChannelDataStoreIntto use.n- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createOne2Any(org.jcsp.util.ints.ChannelDataStoreInt,int),ChannelDataStoreInt
-
createAny2Any
public Any2AnyChannelInt[] createAny2Any(ChannelDataStoreInt buffer, int n)
Constructs and returns an array of
Any2AnyChannelIntobjects which use the specifiedChannelDataStoreIntobject 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:
createAny2Anyin interfaceBufferedChannelIntArrayFactory- Parameters:
buffer- theChannelDataStoreIntto use.n- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createAny2Any(org.jcsp.util.ints.ChannelDataStoreInt,int),ChannelDataStoreInt
-
-