java.lang.isolate
Class BidirectionalLink
java.lang.Object
|
+--java.lang.isolate.Link
|
+--java.lang.isolate.BidirectionalLink
- Direct Known Subclasses:
- BidiLink_Left, BidiLink_Neither, BidiLink_Right
- abstract class BidirectionalLink
- extends Link
A bidirectional connection between two Isolates. In terms of
buffering/blocking behavior, acts as a pair of unidirectional
Links.
Subclasses implement left, right and neither case's send/receive.
Neither case overrides isOpen and close, too.
- Since:
- 1.5
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
leftToRight
private final OneWayLink leftToRight
rightToLeft
private final OneWayLink rightToLeft
name
private final java.lang.String name
id
private static int id
- Global bidi-link identity.
BidirectionalLink
BidirectionalLink(Isolate left,
Isolate right,
java.lang.String name)
throws ClosedLinkException
getNextId
private static int getNextId()
newInstance
static BidirectionalLink newInstance(Isolate left,
Isolate right,
java.lang.String name)
throws ClosedLinkException
isSender
public boolean isSender(Isolate i)
- Overrides:
isSender
in class Link
isReceiver
public boolean isReceiver(Isolate i)
- Overrides:
isReceiver
in class Link
isOpen
public boolean isOpen()
throws java.lang.IllegalStateException
- Overrides:
isOpen
in class Link
close
public void close()
throws java.lang.IllegalStateException
- Overrides:
close
in class Link
name
java.lang.String name()
leftToRight
OneWayLink leftToRight()
rightToLeft
OneWayLink rightToLeft()
send
public abstract boolean send(IsolateMessage lm,
long millis,
int nanos)
throws ClosedLinkException,
java.lang.IllegalStateException,
LinkSerializationException
- Overrides:
send
in class Link
receive
public abstract IsolateMessage receive(long millis,
int nanos)
throws ClosedLinkException,
java.lang.IllegalStateException
- Overrides:
receive
in class Link
clone
Link clone(TeamHandle sourceTeam,
TeamHandle currentTeam)
throws ClosedLinkException
- Description copied from class:
Link
- Clone this link (from the sourceTeam context) in the (current,
destintion) Team context.
- Overrides:
clone
in class Link
- Following copied from class:
java.lang.isolate.Link
- Parameters:
sourceTeam
- the team the link is coming fromcurrentTeam
- the team the link is going to (also the current team context).- Returns:
- the cloned link object
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