JanosVM v0.6.0 Java API Documentation: Class MsgPort
JanosVM v0.6.0 Java API

edu.utah.janosvm.kit.comm.amiga
Class MsgPort

java.lang.Object
  |
  +--edu.utah.janosvm.kit.comm.amiga.MsgPort

public final class MsgPort
extends java.lang.Object

A MsgPort is a simple communication mechanism for threads within the same team.


Constructor Summary
MsgPort(SignalSet listener)
          Construct a MsgPort with the given values.
MsgPort(SignalSet listener, int signalNumber)
          Construct a MsgPort with the given values.
 
Method Summary
protected  void finalize()
           
 Message getMessage()
           
 int getSignalNumber()
           
 void putMessage(Message msg)
           
 java.lang.String toString()
           
 Message waitForMessage()
          Wait for and return the first Message received.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MsgPort

public MsgPort(SignalSet listener,
               int signalNumber)
Construct a MsgPort with the given values.
Parameters:
listener - The SignalSet that the RemoteFaxPort should signal when it receives a fax.
signalNumber - The SignalNumber that the RemoteFaxPort should signal when it receives a fax.

MsgPort

public MsgPort(SignalSet listener)
Construct a MsgPort with the given values.
Parameters:
listener - The SignalSet that the RemoteFaxPort should signal when it receives a fax.
Method Detail

getSignalNumber

public int getSignalNumber()
Returns:
The signal number that will get signalled when a fax is received.

putMessage

public void putMessage(Message msg)
Parameters:
msg - The Message to add to the queue. Note: The message isn't copied so you mustn't change any values until you receive the reply.

getMessage

public Message getMessage()
Returns:
The Message at the head of the queue or null if the queue is empty.

waitForMessage

public Message waitForMessage()
Wait for and return the first Message received.
Returns:
The first message.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object

JanosVM v0.6.0 Java API

This documentation is Copyright (C) 2000-2002 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Mar 17, 2002