|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcsp.lang.BlackHoleChannel
public class BlackHoleChannel
This implements ChannelOutput
with black hole semantics.
ChannelOutput
that yields
black hole semantics for the channel. Writers may always write but there can be
no readers. Any number of writers may share the same black hole.
Note: BlackHoleChannels are used for masking off unwanted outputs from processes. They are useful when we want to reuse an existing process component intact, but don't need some of its output channels (i.e. we don't want to redesign and reimplement the component to remove the redundant channels). Normal channels cannot be plugged in and left dangling as this may deadlock (parts of) the component being reused.
ChannelOutput
,
One2OneChannel
,
Any2OneChannel
,
One2AnyChannel
,
Any2AnyChannel
Constructor Summary | |
---|---|
BlackHoleChannel()
|
Method Summary | |
---|---|
void |
poison(int strength)
This injects poison into the channel. |
void |
write(Object object)
Write an Object to the channel and lose it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlackHoleChannel()
Method Detail |
---|
public void write(Object object)
write
in interface ChannelOutput
object
- the object to write to the channel.public void poison(int strength)
Poisonable
poison
in interface Poisonable
strength
- the strength of the poison (must be >= 0).
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |