CSP for Java
(JCSP) 1.1-rc4

org.jcsp.util.filter
Class PoisonFilter

java.lang.Object
  extended by org.jcsp.util.filter.PoisonFilter
All Implemented Interfaces:
Filter

public class PoisonFilter
extends Object
implements Filter

This filter will throw a PoisonException when filter(Object) is called. This can be used to prevent a channel from being written to or read from.

Author:
Quickstone Technologies Limited

Constructor Summary
PoisonFilter()
          Constructs a new filter with the default message.
PoisonFilter(String message)
          Constructs a new filter with a specific message.
 
Method Summary
 Object filter(Object obj)
          Applies the filter operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoisonFilter

public PoisonFilter()
Constructs a new filter with the default message.


PoisonFilter

public PoisonFilter(String message)
Constructs a new filter with a specific message.

Method Detail

filter

public Object filter(Object obj)
Description copied from interface: Filter
Applies the filter operation. The object given can be modified and returned or another object substituted in its place.

Specified by:
filter in interface Filter
Parameters:
obj - the original object in the channel communication.
Returns:
the modified/substituted object after filtration.

CSP for Java
(JCSP) 1.1-rc4

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