CSP for Java
(JCSP) 1.1-rc2

org.jcsp.lang
Class Channel

java.lang.Object
  extended by org.jcsp.lang.Channel

public class Channel
extends Object

This class provides static factory methods for constructing various different types of channel objects. There are also methods for constructing arrays of identical channels.

Author:
Quickstone Technologies Limited

Method Summary
static Any2AnyChannel any2any()
           
static Any2AnyChannel any2any(ChannelDataStore buffer)
           
static Any2AnyChannel any2any(ChannelDataStore buffer, int immunity)
           
static Any2AnyChannel any2any(int immunity)
           
static Any2AnyChannel[] any2anyArray(int size)
           
static Any2AnyChannel[] any2anyArray(int size, ChannelDataStore data)
           
static Any2AnyChannel[] any2anyArray(int size, ChannelDataStore data, int immunity)
           
static Any2AnyChannel[] any2anyArray(int size, int immunity)
           
static Any2AnyChannelInt any2anyInt()
           
static Any2AnyChannelInt any2anyInt(ChannelDataStoreInt buffer)
           
static Any2AnyChannelInt any2anyInt(ChannelDataStoreInt buffer, int immunity)
           
static Any2AnyChannelInt any2anyInt(int immunity)
           
static Any2AnyChannelInt[] any2anyIntArray(int size)
           
static Any2AnyChannelInt[] any2anyIntArray(int size, ChannelDataStoreInt data)
           
static Any2AnyChannelInt[] any2anyIntArray(int size, ChannelDataStoreInt data, int immunity)
           
static Any2AnyChannelInt[] any2anyIntArray(int size, int immunity)
           
static Any2OneChannel any2one()
           
static Any2OneChannel any2one(ChannelDataStore buffer)
           
static Any2OneChannel any2one(ChannelDataStore buffer, int immunity)
           
static Any2OneChannel any2one(int immunity)
           
static Any2OneChannel[] any2oneArray(int size)
           
static Any2OneChannel[] any2oneArray(int size, ChannelDataStore data)
           
static Any2OneChannel[] any2oneArray(int size, ChannelDataStore data, int immunity)
           
static Any2OneChannel[] any2oneArray(int size, int immunity)
           
static Any2OneChannelInt any2oneInt()
           
static Any2OneChannelInt any2oneInt(ChannelDataStoreInt buffer)
           
static Any2OneChannelInt any2oneInt(ChannelDataStoreInt buffer, int immunity)
           
static Any2OneChannelInt any2oneInt(int immunity)
           
static Any2OneChannelInt[] any2oneIntArray(int size)
           
static Any2OneChannelInt[] any2oneIntArray(int size, ChannelDataStoreInt data)
           
static Any2OneChannelInt[] any2oneIntArray(int size, ChannelDataStoreInt data, int immunity)
           
static Any2OneChannelInt[] any2oneIntArray(int size, int immunity)
           
static Any2AnyChannel createAny2Any()
          Deprecated. Use the any2any() function instead.
static Any2AnyChannel createAny2Any(ChannelDataStore buffer)
          Deprecated. Use the any2any() function instead.
static Any2AnyChannel[] createAny2Any(ChannelDataStore buffer, int n)
          Deprecated. Use the any2anyArray() function instead.
static Any2AnyChannel[] createAny2Any(int n)
          Deprecated. Use the any2anyArray() function instead.
static Any2OneChannel createAny2One()
          Deprecated. Use the any2one() function instead.
static Any2OneChannel createAny2One(ChannelDataStore buffer)
          Deprecated. Use the any2one() function instead.
static Any2OneChannel[] createAny2One(ChannelDataStore buffer, int n)
          Deprecated. Use the any2oneArray() function instead.
static Any2OneChannel[] createAny2One(int n)
          Deprecated. Use the any2oneArray() function instead.
static One2AnyChannel createOne2Any()
          Deprecated. Use the one2any() function instead.
static One2AnyChannel createOne2Any(ChannelDataStore buffer)
          Deprecated. Use the one2any() function instead.
static One2AnyChannel[] createOne2Any(ChannelDataStore buffer, int n)
          Deprecated. Use the one2anyArray() function instead.
static One2AnyChannel[] createOne2Any(int n)
          Deprecated. Use the one2anyArray() function instead.
static One2OneChannel createOne2One()
          Deprecated. Use the one2one() function instead.
static One2OneChannel createOne2One(ChannelDataStore buffer)
          Deprecated. Use the one2one() function instead.
static One2OneChannel[] createOne2One(ChannelDataStore buffer, int n)
          Deprecated. Use the one2oneArray() function instead.
static One2OneChannel[] createOne2One(int n)
          Deprecated. Use the one2oneArray() function instead.
static SharedChannelInput[] getInputArray(Any2AnyChannel[] c)
          Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers.
static AltingChannelInput[] getInputArray(Any2OneChannel[] c)
          Constructs and returns an array of input channel ends, each of which can be used as guards in an Alternative.
static SharedChannelInput[] getInputArray(One2AnyChannel[] c)
          Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers.
static AltingChannelInput[] getInputArray(One2OneChannel[] c)
          Constructs and returns an array of input channel ends, each of which can be used as guards in an Alternative.
static SharedChannelOutput[] getOutputArray(Any2AnyChannel[] c)
          Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers.
static SharedChannelOutput[] getOutputArray(Any2OneChannel[] c)
          Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers.
static ChannelOutput[] getOutputArray(One2AnyChannel[] c)
          Constructs and returns an array of output channel ends, each of which can only be used by a single writer.
static ChannelOutput[] getOutputArray(One2OneChannel[] c)
          Constructs and returns an array of output channel ends, each of which can only be used by a single writer.
static One2AnyChannel one2any()
           
static One2AnyChannel one2any(ChannelDataStore buffer)
           
static One2AnyChannel one2any(ChannelDataStore buffer, int immunity)
           
static One2AnyChannel one2any(int immunity)
           
static One2AnyChannel[] one2anyArray(int size)
           
static One2AnyChannel[] one2anyArray(int size, ChannelDataStore data)
           
static One2AnyChannel[] one2anyArray(int size, ChannelDataStore data, int immunity)
           
static One2AnyChannel[] one2anyArray(int size, int immunity)
           
static One2AnyChannelInt one2anyInt()
           
static One2AnyChannelInt one2anyInt(ChannelDataStoreInt buffer)
           
static One2AnyChannelInt one2anyInt(ChannelDataStoreInt buffer, int immunity)
           
static One2AnyChannelInt one2anyInt(int immunity)
           
static One2AnyChannelInt[] one2anyIntArray(int size)
           
static One2AnyChannelInt[] one2anyIntArray(int size, ChannelDataStoreInt data)
           
static One2AnyChannelInt[] one2anyIntArray(int size, ChannelDataStoreInt data, int immunity)
           
static One2AnyChannelInt[] one2anyIntArray(int size, int immunity)
           
static One2OneChannel one2one()
           
static One2OneChannel one2one(ChannelDataStore buffer)
           
static One2OneChannel one2one(ChannelDataStore buffer, int immunity)
           
static One2OneChannel one2one(int immunity)
           
static One2OneChannel[] one2oneArray(int size)
           
static One2OneChannel[] one2oneArray(int size, ChannelDataStore data)
           
static One2OneChannel[] one2oneArray(int size, ChannelDataStore data, int immunity)
           
static One2OneChannel[] one2oneArray(int size, int immunity)
           
static One2OneChannelInt one2oneInt()
           
static One2OneChannelInt one2oneInt(ChannelDataStoreInt buffer)
           
static One2OneChannelInt one2oneInt(ChannelDataStoreInt buffer, int immunity)
           
static One2OneChannelInt one2oneInt(int immunity)
           
static One2OneChannelInt[] one2oneIntArray(int size)
           
static One2OneChannelInt[] one2oneIntArray(int size, ChannelDataStoreInt data)
           
static One2OneChannelInt[] one2oneIntArray(int size, ChannelDataStoreInt data, int immunity)
           
static One2OneChannelInt[] one2oneIntArray(int size, int immunity)
           
static One2OneChannelSymmetricInt one2oneSymmetricInt()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createOne2One

public static One2OneChannel createOne2One()
Deprecated. Use the one2one() function instead.

Constructs and returns a One2OneChannel object.

Returns:
the channel object.
See Also:
ChannelFactory.createOne2One()

createAny2One

public static Any2OneChannel createAny2One()
Deprecated. Use the any2one() function instead.

Constructs and returns an Any2OneChannel object.

Returns:
the channel object.
See Also:
ChannelFactory.createAny2One()

createOne2Any

public static One2AnyChannel createOne2Any()
Deprecated. Use the one2any() function instead.

Constructs and returns a One2AnyChannel object.

Returns:
the channel object.
See Also:
ChannelFactory.createOne2Any()

createAny2Any

public static Any2AnyChannel createAny2Any()
Deprecated. Use the any2any() function instead.

Constructs and returns an Any2AnyChannel object.

Returns:
the channel object.
See Also:
ChannelFactory.createAny2Any()

createOne2One

public static One2OneChannel[] createOne2One(int n)
Deprecated. Use the one2oneArray() function instead.

Constructs and returns an array of One2OneChannel objects.

Parameters:
n - the size of the array of channels.
Returns:
the array of channels.
See Also:
ChannelArrayFactory.createOne2One(int)

createAny2One

public static Any2OneChannel[] createAny2One(int n)
Deprecated. Use the any2oneArray() function instead.

Constructs and returns an array of Any2OneChannel objects.

Parameters:
n - the size of the array of channels.
Returns:
the array of channels.
See Also:
ChannelArrayFactory.createAny2One(int)

createOne2Any

public static One2AnyChannel[] createOne2Any(int n)
Deprecated. Use the one2anyArray() function instead.

Constructs and returns an array of One2AnyChannel objects.

Parameters:
n - the size of the array of channels.
Returns:
the array of channels.
See Also:
ChannelArrayFactory.createOne2Any(int)

createAny2Any

public static Any2AnyChannel[] createAny2Any(int n)
Deprecated. Use the any2anyArray() function instead.

Constructs and returns an array of Any2AnyChannel objects.

Parameters:
n - the size of the array of channels.
Returns:
the array of channels.
See Also:
ChannelArrayFactory.createAny2Any(int)

createOne2One

public static One2OneChannel createOne2One(ChannelDataStore buffer)
Deprecated. Use the one2one() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
Returns:
the buffered channel.
See Also:
BufferedChannelFactory.createOne2One(ChannelDataStore), ChannelDataStore

createAny2One

public static Any2OneChannel createAny2One(ChannelDataStore buffer)
Deprecated. Use the any2one() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
Returns:
the buffered channel.
See Also:
BufferedChannelFactory.createAny2One(ChannelDataStore), ChannelDataStore

createOne2Any

public static One2AnyChannel createOne2Any(ChannelDataStore buffer)
Deprecated. Use the one2any() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
Returns:
the buffered channel.
See Also:
BufferedChannelFactory.createOne2Any(ChannelDataStore), ChannelDataStore

createAny2Any

public static Any2AnyChannel createAny2Any(ChannelDataStore buffer)
Deprecated. Use the any2any() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
Returns:
the buffered channel.
See Also:
BufferedChannelFactory.createAny2Any(ChannelDataStore), ChannelDataStore

createOne2One

public static One2OneChannel[] createOne2One(ChannelDataStore buffer,
                                             int n)
Deprecated. Use the one2oneArray() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
n - the size of the array of channels.
Returns:
the array of buffered channels.
See Also:
BufferedChannelArrayFactory.createOne2One(ChannelDataStore, int), ChannelDataStore

createAny2One

public static Any2OneChannel[] createAny2One(ChannelDataStore buffer,
                                             int n)
Deprecated. Use the any2oneArray() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
n - the size of the array of channels.
Returns:
the array of buffered channels.
See Also:
BufferedChannelArrayFactory.createAny2One(ChannelDataStore, int), ChannelDataStore

createOne2Any

public static One2AnyChannel[] createOne2Any(ChannelDataStore buffer,
                                             int n)
Deprecated. Use the one2anyArray() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
n - the size of the array of channels.
Returns:
the array of buffered channels.
See Also:
BufferedChannelArrayFactory.createOne2Any(ChannelDataStore, int), ChannelDataStore

createAny2Any

public static Any2AnyChannel[] createAny2Any(ChannelDataStore buffer,
                                             int n)
Deprecated. Use the any2anyArray() function instead.

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.

Parameters:
buffer - the ChannelDataStore to use.
n - the size of the array of channels.
Returns:
the array of buffered channels.
See Also:
BufferedChannelArrayFactory.createAny2Any(ChannelDataStore, int), ChannelDataStore

getInputArray

public static SharedChannelInput[] getInputArray(Any2AnyChannel[] c)

Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers. The returned array, r, is constructed such that r[i] = c[i].in () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain input ends from.
Returns:
the array of channel input ends.

getInputArray

public static AltingChannelInput[] getInputArray(Any2OneChannel[] c)
Constructs and returns an array of input channel ends, each of which can be used as guards in an Alternative. The returned array, r, is constructed such that r[i] = c[i].in () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain input ends from.
Returns:
the array of channel input ends.

getInputArray

public static SharedChannelInput[] getInputArray(One2AnyChannel[] c)
Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers. The returned array, r, is constructed such that r[i] = c[i].in () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain input ends from.
Returns:
the array of channel input ends.

getInputArray

public static AltingChannelInput[] getInputArray(One2OneChannel[] c)
Constructs and returns an array of input channel ends, each of which can be used as guards in an Alternative. The returned array, r, is constructed such that r[i] = c[i].in () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain input ends from.
Returns:
the array of channel input ends.

getOutputArray

public static SharedChannelOutput[] getOutputArray(Any2AnyChannel[] c)
Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers. The returned array, r, is constructed such that r[i] = c[i].out () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain output ends from.
Returns:
the array of output input ends.

getOutputArray

public static SharedChannelOutput[] getOutputArray(Any2OneChannel[] c)
Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers. The returned array, r, is constructed such that r[i] = c[i].out () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain output ends from.
Returns:
the array of output input ends.

getOutputArray

public static ChannelOutput[] getOutputArray(One2AnyChannel[] c)
Constructs and returns an array of output channel ends, each of which can only be used by a single writer. The returned array, r, is constructed such that r[i] = c[i].out () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain output ends from.
Returns:
the array of output input ends.

getOutputArray

public static ChannelOutput[] getOutputArray(One2OneChannel[] c)
Constructs and returns an array of output channel ends, each of which can only be used by a single writer. The returned array, r, is constructed such that r[i] = c[i].out () for 0 <= i < c.length.

Parameters:
c - the array of channel to obtain output ends from.
Returns:
the array of output input ends.

one2one

public static One2OneChannel one2one()

one2any

public static One2AnyChannel one2any()

any2one

public static Any2OneChannel any2one()

any2any

public static Any2AnyChannel any2any()

one2oneSymmetricInt

public static One2OneChannelSymmetricInt one2oneSymmetricInt()

one2one

public static One2OneChannel one2one(ChannelDataStore buffer)

one2any

public static One2AnyChannel one2any(ChannelDataStore buffer)

any2one

public static Any2OneChannel any2one(ChannelDataStore buffer)

any2any

public static Any2AnyChannel any2any(ChannelDataStore buffer)

one2one

public static One2OneChannel one2one(int immunity)

one2any

public static One2AnyChannel one2any(int immunity)

any2one

public static Any2OneChannel any2one(int immunity)

any2any

public static Any2AnyChannel any2any(int immunity)

one2one

public static One2OneChannel one2one(ChannelDataStore buffer,
                                     int immunity)

one2any

public static One2AnyChannel one2any(ChannelDataStore buffer,
                                     int immunity)

any2one

public static Any2OneChannel any2one(ChannelDataStore buffer,
                                     int immunity)

any2any

public static Any2AnyChannel any2any(ChannelDataStore buffer,
                                     int immunity)

one2oneArray

public static One2OneChannel[] one2oneArray(int size)

one2anyArray

public static One2AnyChannel[] one2anyArray(int size)

any2oneArray

public static Any2OneChannel[] any2oneArray(int size)

any2anyArray

public static Any2AnyChannel[] any2anyArray(int size)

one2oneArray

public static One2OneChannel[] one2oneArray(int size,
                                            int immunity)

one2anyArray

public static One2AnyChannel[] one2anyArray(int size,
                                            int immunity)

any2oneArray

public static Any2OneChannel[] any2oneArray(int size,
                                            int immunity)

any2anyArray

public static Any2AnyChannel[] any2anyArray(int size,
                                            int immunity)

one2oneArray

public static One2OneChannel[] one2oneArray(int size,
                                            ChannelDataStore data)

one2anyArray

public static One2AnyChannel[] one2anyArray(int size,
                                            ChannelDataStore data)

any2oneArray

public static Any2OneChannel[] any2oneArray(int size,
                                            ChannelDataStore data)

any2anyArray

public static Any2AnyChannel[] any2anyArray(int size,
                                            ChannelDataStore data)

one2oneArray

public static One2OneChannel[] one2oneArray(int size,
                                            ChannelDataStore data,
                                            int immunity)

one2anyArray

public static One2AnyChannel[] one2anyArray(int size,
                                            ChannelDataStore data,
                                            int immunity)

any2oneArray

public static Any2OneChannel[] any2oneArray(int size,
                                            ChannelDataStore data,
                                            int immunity)

any2anyArray

public static Any2AnyChannel[] any2anyArray(int size,
                                            ChannelDataStore data,
                                            int immunity)

one2oneInt

public static One2OneChannelInt one2oneInt()

one2anyInt

public static One2AnyChannelInt one2anyInt()

any2oneInt

public static Any2OneChannelInt any2oneInt()

any2anyInt

public static Any2AnyChannelInt any2anyInt()

one2oneInt

public static One2OneChannelInt one2oneInt(ChannelDataStoreInt buffer)

one2anyInt

public static One2AnyChannelInt one2anyInt(ChannelDataStoreInt buffer)

any2oneInt

public static Any2OneChannelInt any2oneInt(ChannelDataStoreInt buffer)

any2anyInt

public static Any2AnyChannelInt any2anyInt(ChannelDataStoreInt buffer)

one2oneInt

public static One2OneChannelInt one2oneInt(int immunity)

one2anyInt

public static One2AnyChannelInt one2anyInt(int immunity)

any2oneInt

public static Any2OneChannelInt any2oneInt(int immunity)

any2anyInt

public static Any2AnyChannelInt any2anyInt(int immunity)

one2oneInt

public static One2OneChannelInt one2oneInt(ChannelDataStoreInt buffer,
                                           int immunity)

one2anyInt

public static One2AnyChannelInt one2anyInt(ChannelDataStoreInt buffer,
                                           int immunity)

any2oneInt

public static Any2OneChannelInt any2oneInt(ChannelDataStoreInt buffer,
                                           int immunity)

any2anyInt

public static Any2AnyChannelInt any2anyInt(ChannelDataStoreInt buffer,
                                           int immunity)

one2oneIntArray

public static One2OneChannelInt[] one2oneIntArray(int size)

one2anyIntArray

public static One2AnyChannelInt[] one2anyIntArray(int size)

any2oneIntArray

public static Any2OneChannelInt[] any2oneIntArray(int size)

any2anyIntArray

public static Any2AnyChannelInt[] any2anyIntArray(int size)

one2oneIntArray

public static One2OneChannelInt[] one2oneIntArray(int size,
                                                  int immunity)

one2anyIntArray

public static One2AnyChannelInt[] one2anyIntArray(int size,
                                                  int immunity)

any2oneIntArray

public static Any2OneChannelInt[] any2oneIntArray(int size,
                                                  int immunity)

any2anyIntArray

public static Any2AnyChannelInt[] any2anyIntArray(int size,
                                                  int immunity)

one2oneIntArray

public static One2OneChannelInt[] one2oneIntArray(int size,
                                                  ChannelDataStoreInt data)

one2anyIntArray

public static One2AnyChannelInt[] one2anyIntArray(int size,
                                                  ChannelDataStoreInt data)

any2oneIntArray

public static Any2OneChannelInt[] any2oneIntArray(int size,
                                                  ChannelDataStoreInt data)

any2anyIntArray

public static Any2AnyChannelInt[] any2anyIntArray(int size,
                                                  ChannelDataStoreInt data)

one2oneIntArray

public static One2OneChannelInt[] one2oneIntArray(int size,
                                                  ChannelDataStoreInt data,
                                                  int immunity)

one2anyIntArray

public static One2AnyChannelInt[] one2anyIntArray(int size,
                                                  ChannelDataStoreInt data,
                                                  int immunity)

any2oneIntArray

public static Any2OneChannelInt[] any2oneIntArray(int size,
                                                  ChannelDataStoreInt data,
                                                  int immunity)

any2anyIntArray

public static Any2AnyChannelInt[] any2anyIntArray(int size,
                                                  ChannelDataStoreInt data,
                                                  int immunity)

CSP for Java
(JCSP) 1.1-rc2

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc2 of the JCSP API Specification (Copyright 1997-2007 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.