Package org.jcsp.lang

# Class Connection

java.lang.Object
org.jcsp.lang.Connection

public class Connection extends Object
This class provides static factory methods for constructing different types of connection. The methods are equivalent to the non-static methods of the `StandardConnectionFactory` class.

Author:
  Quickstone Technologies Limited

## Method Summary

Modifier and Type
Method
Description
`static Any2OneConnection[]`
`any2oneArray(int n)`
`static Any2AnyConnection`
`createAny2Any()`
`static Any2AnyConnection[]`
`createAny2Any(int n)`
`static Any2OneConnection`
`createAny2One()`
`static One2AnyConnection`
`createOne2Any()`
`static One2AnyConnection[]`
`createOne2Any(int n)`
`static One2OneConnection`
`createOne2One()`
`static One2OneConnection[]`
`createOne2One(int n)`
`static SharedConnectionClient[]`
`getClientArray(Any2AnyConnection[] c)`
Returns an array of client connection ends suitable for use by multiple concurrent processes.
`static SharedConnectionClient[]`
`getClientArray(Any2OneConnection[] c)`
Returns an array of client connection ends suitable for use by multiple concurrent processes.
`static AltingConnectionClient[]`
`getClientArray(One2AnyConnection[] c)`
Returns an array of client connection ends suitable for use as guards in an `Alternative` construct.
`static AltingConnectionClient[]`
`getClientArray(One2OneConnection[] c)`
Returns an array of client connection ends suitable for use as guards in an `Alternative` construct.
`static SharedConnectionServer[]`
`getServerArray(Any2AnyConnection[] c)`
Returns an array of server connection ends suitable for use by multiple concurrent processes.
`static AltingConnectionServer[]`
`getServerArray(Any2OneConnection[] c)`
Returns an array of server connection ends suitable for use as guards in an `Alternative` construct.
`static SharedConnectionServer[]`
`getServerArray(One2AnyConnection[] c)`
Returns an array of server connection ends suitable for use by multiple concurrent processes.
`static AltingConnectionServer[]`
`getServerArray(One2OneConnection[] c)`
Returns an array of server connection ends suitable for use as guards in an `Alternative` construct.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### createOne2One

public static One2OneConnection createOne2One()

See Also:
  - `ConnectionFactory.createOne2One()`

### createAny2One

public static Any2OneConnection createAny2One()

See Also:
  - `ConnectionFactory.createAny2One()`

### createOne2Any

public static One2AnyConnection createOne2Any()

See Also:
  - `ConnectionFactory.createOne2Any()`

### createAny2Any

public static Any2AnyConnection createAny2Any()

See Also:
  - `ConnectionFactory.createAny2Any()`

### createOne2One

public static One2OneConnection[] createOne2One(int n)

See Also:
  - `ConnectionArrayFactory.createOne2One(int)`

### any2oneArray

public static Any2OneConnection[] any2oneArray(int n)

See Also:
  - `ConnectionArrayFactory.createAny2One(int)`

### createOne2Any

public static One2AnyConnection[] createOne2Any(int n)

See Also:
  - `ConnectionArrayFactory.createOne2Any(int)`

### createAny2Any

public static Any2AnyConnection[] createAny2Any(int n)

See Also:
  - `ConnectionArrayFactory.createAny2Any(int)`

### getClientArray

public static AltingConnectionClient[] getClientArray(One2AnyConnection[] c)
Returns an array of client connection ends suitable for use as guards in an `Alternative` construct.

Parameters:
  `c` - the connection array to get the client ends from.
Returns:
  the array of client ends.

### getClientArray

public static AltingConnectionClient[] getClientArray(One2OneConnection[] c)
Returns an array of client connection ends suitable for use as guards in an `Alternative` construct.

Parameters:
  `c` - the connection array to get the client ends from.
Returns:
  the array of client ends.

### getClientArray

public static SharedConnectionClient[] getClientArray(Any2AnyConnection[] c)
Returns an array of client connection ends suitable for use by multiple concurrent processes.

Parameters:
  `c` - the connection array to get the client ends from.
Returns:
  the array of client ends.

### getClientArray

public static SharedConnectionClient[] getClientArray(Any2OneConnection[] c)
Returns an array of client connection ends suitable for use by multiple concurrent processes.

Parameters:
  `c` - the connection array to get the client ends from.
Returns:
  the array of client ends.

### getServerArray

public static AltingConnectionServer[] getServerArray(Any2OneConnection[] c)
Returns an array of server connection ends suitable for use as guards in an `Alternative` construct.

Parameters:
  `c` - the connection array to get the server ends from.
Returns:
  the array of server ends.

### getServerArray

public static AltingConnectionServer[] getServerArray(One2OneConnection[] c)
Returns an array of server connection ends suitable for use as guards in an `Alternative` construct.

Parameters:
  `c` - the connection array to get the server ends from.
Returns:
  the array of server ends.

### getServerArray

public static SharedConnectionServer[] getServerArray(Any2AnyConnection[] c)
Returns an array of server connection ends suitable for use by multiple concurrent processes.

Parameters:
  `c` - the connection array to get the server ends from.
Returns:
  the array of server ends.

### getServerArray

public static SharedConnectionServer[] getServerArray(One2AnyConnection[] c)
Returns an array of server connection ends suitable for use by multiple concurrent processes.

Parameters:
  `c` - the connection array to get the server ends from.
Returns:
  the array of server ends.