JanosVM v1.0 API

java.lang.isolate
Class Link

java.lang.Object
  |
  +--java.lang.isolate.Link
Direct Known Subclasses:
BidirectionalLink, EventLink, OneWayLink

public abstract class Link
extends java.lang.Object


Field Summary
private  java.lang.String typeName
          A Hack to avoid toString() invocations on non-shared types (like BidiLink_Neither)
 
Constructor Summary
protected Link(java.lang.String typeName)
           
 
Method Summary
(package private) abstract  Link clone(TeamHandle sourceTeam, TeamHandle currentTeam)
          Clone this link (from the sourceTeam context) in the (current, destintion) Team context.
abstract  void close()
           
abstract  boolean isOpen()
           
abstract  boolean isReceiver(Isolate i)
           
abstract  boolean isSender(Isolate i)
           
static Link newEventLink(Isolate sender, Isolate receiver)
           
static Link newLink(Isolate sender, Isolate receiver)
           
 IsolateMessage receive()
          Blocking receive.
(package private) abstract  IsolateMessage receive(long millis, int nanos)
           
 void send(IsolateMessage x)
           
(package private) abstract  boolean send(IsolateMessage x, long millis, int nanos)
           
 java.lang.String toString()
           
(package private)  IsolateMessage tryReceive()
           
(package private)  boolean trySend(IsolateMessage x)
          Non-blocking send, only succeeds if a receiver is waiting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0
 

Field Detail

typeName

private final java.lang.String typeName
A Hack to avoid toString() invocations on non-shared types (like BidiLink_Neither)
Constructor Detail

Link

protected Link(java.lang.String typeName)
Method Detail

newLink

public static Link newLink(Isolate sender,
                           Isolate receiver)
                    throws ClosedLinkException

newEventLink

public static Link newEventLink(Isolate sender,
                                Isolate receiver)
                         throws ClosedLinkException

isSender

public abstract boolean isSender(Isolate i)

isReceiver

public abstract boolean isReceiver(Isolate i)

close

public abstract void close()
                    throws java.lang.IllegalStateException

isOpen

public abstract boolean isOpen()
                        throws java.lang.IllegalStateException

clone

abstract Link clone(TeamHandle sourceTeam,
                    TeamHandle currentTeam)
             throws ClosedLinkException
Clone this link (from the sourceTeam context) in the (current, destintion) Team context.
Parameters:
sourceTeam - the team the link is coming from
currentTeam - the team the link is going to (also the current team context).
Returns:
the cloned link object

send

abstract boolean send(IsolateMessage x,
                      long millis,
                      int nanos)
               throws ClosedLinkException,
                      java.io.IOException

send

public void send(IsolateMessage x)
          throws ClosedLinkException,
                 java.io.IOException

trySend

boolean trySend(IsolateMessage x)
          throws ClosedLinkException,
                 java.io.IOException
Non-blocking send, only succeeds if a receiver is waiting.

receive

abstract IsolateMessage receive(long millis,
                                int nanos)
                         throws ClosedLinkException

receive

public IsolateMessage receive()
                       throws ClosedLinkException
Blocking receive. Blocks until a recieve is completed (or an error or close occurs).

tryReceive

IsolateMessage tryReceive()
                    throws ClosedLinkException

toString

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

JanosVM v1.0 API

This documentation is Copyright (C) 2000-2003 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 Feb 13, 2003