Package org.jcsp.lang

# Interface ChannelAccept

All Known Implementing Classes:
  `AltingChannelAccept`, `Any2AnyCallChannel`, `Any2OneCallChannel`, `One2AnyCallChannel`, `One2OneCallChannel`

public interface ChannelAccept
This defines the interface for accepting CALL channels.

## Description

`ChannelAccept` defines the interface for accepting CALL channels. The interface contains only one method - ``accept``.

## Example

See the explanations and examples documented in the CALL channel super-classes (listed below).

Author:
  P.H. Welch
See Also:
  - `One2OneCallChannel`
  - `Any2OneCallChannel`
  - `One2AnyCallChannel`
  - `Any2AnyCallChannel`

## Method Summary

Modifier and Type
Method
Description
`int`
`accept(CSProcess server)`
This is invoked by a server when it commits to accepting a CALL from a client.

## Method Details

### accept

int accept(CSProcess server)
This is invoked by a server when it commits to accepting a CALL from a client. The parameter supplied must be a reference to this server - see the example from `One2OneCallChannel`. It will not complete until a CALL has been made. If the derived CALL channel has set the `selected` field in the way defined by the standard calling sequence, the value returned by this method will indicate which method was called.

Parameters:
  `server` - the server process receiving the CALL.