CSP for Java
(JCSP) 1.0-rc4

jcsp.lang
Class BlackHoleChannel

java.lang.Object
  |
  +--jcsp.lang.BlackHoleChannel
All Implemented Interfaces:
ChannelOutput

public class BlackHoleChannel
extends Object
implements ChannelOutput

This implements ChannelOutput with black hole semantics.

Description

BlackHoleChannel is an implementation of 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.

Author:
P.H.Welch
See Also:
ChannelOutput, One2OneChannel, Any2OneChannel, One2AnyChannel, Any2AnyChannel

Constructor Summary
BlackHoleChannel()
           
 
Method Summary
 void write(Object object)
          Write an Object to the channel and loose it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlackHoleChannel

public BlackHoleChannel()
Method Detail

write

public void write(Object object)
Write an Object to the channel and loose it.
Specified by:
write in interface ChannelOutput
Parameters:
value - the object to write to the channel.

CSP for Java
(JCSP) 1.0-rc4

Submit a bug or feature to jcsp-team@ukc.ac.uk
Version 1.0-rc4 of the JCSP API Specification (Copyright 1997-2000 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.