de.mud.jta

Interface FilterPlugin

Known Implementing Classes:
ButtonBar, Capture, Script, Shell, Sink, Socket, SSH, Telnet, Terminal, Timeout, URLFilter

public interface FilterPlugin

The filter plugin is the base interface for plugins that want to intercept the communication between front end and back end plugins. Filters and protocol handlers are a good example.

Maintainer: Matthias L. Jugel

Version:
$Id: FilterPlugin.java 499 2005-09-29 08:24:54Z leo $
Author:
Matthias L. Jugel, Marcus Mei???ner

Method Summary

FilterPlugin
getFilterSource()
int
read(byte[] b)
Read a block of data from the back end.
void
setFilterSource(FilterPlugin source)
Set the source plugin where we get our data from and where the data sink (write) is.
void
write(byte[] b)
Write a block of data to the back end.

Method Details

getFilterSource

public FilterPlugin getFilterSource()

read

public int read(byte[] b)
            throws IOException
Read a block of data from the back end.
Parameters:
b - the buffer to read the data into
Returns:
the amount of bytes actually read

setFilterSource

public void setFilterSource(FilterPlugin source)
            throws IllegalArgumentException
Set the source plugin where we get our data from and where the data sink (write) is. The actual data handling should be done in the read() and write() methods.
Parameters:
source - the data source

write

public void write(byte[] b)
            throws IOException
Write a block of data to the back end.
Parameters:
b - the buffer to be sent