CSP for Java
(JCSP) 1.1-rc2

org.jcsp.lang
Class ChannelOutputWrapper

java.lang.Object
  extended by org.jcsp.lang.ChannelOutputWrapper
All Implemented Interfaces:
ChannelOutput, Poisonable
Direct Known Subclasses:
FilteredSharedChannelOutputWrapper

public class ChannelOutputWrapper
extends Object
implements ChannelOutput

Defines a wrapper to go around a channel output end. This wrapper allows a channel end to be given away without any risk of the user of that end casting it to a channel input because they cannot gain access to the actual channel end.

Author:
Quickstone Technologies Limited

Constructor Summary
ChannelOutputWrapper(ChannelOutput out)
          Creates a new wrapper for the given channel end.
 
Method Summary
 void poison(int strength)
           
 void write(Object o)
          Writes a value to the channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelOutputWrapper

public ChannelOutputWrapper(ChannelOutput out)
Creates a new wrapper for the given channel end.

Parameters:
out - the existing channel end.
Method Detail

write

public void write(Object o)
Writes a value to the channel.

Specified by:
write in interface ChannelOutput
Parameters:
o - the value to write.
See Also:
ChannelOutput

poison

public void poison(int strength)
Specified by:
poison in interface Poisonable

CSP for Java
(JCSP) 1.1-rc2

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc2 of the JCSP API Specification (Copyright 1997-2007 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.