jist.minisim
Class block

java.lang.Object
  extended by jist.minisim.block
All Implemented Interfaces:
JistAPI.Entity, JistAPI.Timeless

public class block
extends java.lang.Object
implements JistAPI.Entity

Blocking channel entity demo/test. Note how the send and receive co-routines block at the channel send and receive calls. The channel also provides methods for non-blocking sends, and dropping packets if the channel is full.

Since:
JIST1.0
Version:
$Id: block.java,v 1.7 2004/04/06 16:07:42 barr Exp $
Author:
Rimon Barr <barr+jist@cs.cornell.edu>

Field Summary
private  Channel c
          Communication channel entity.
 
Constructor Summary
block()
           
 
Method Summary
static void main(java.lang.String[] args)
          Schedule two messages; one with the receive first and one with the send first.
 void receive()
          Receive a message from the channel.
 void send()
          Send a message along the channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c

private Channel c
Communication channel entity.

Constructor Detail

block

public block()
Method Detail

main

public static void main(java.lang.String[] args)
Schedule two messages; one with the receive first and one with the send first.

Parameters:
args - command-line parameters

send

public void send()
Send a message along the channel.


receive

public void receive()
Receive a message from the channel.