de.mud.jta
Interface FilterPlugin

All 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 Detail

setFilterSource

void setFilterSource(FilterPlugin source)
                     throws java.lang.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
Throws:
java.lang.IllegalArgumentException

getFilterSource

FilterPlugin getFilterSource()

read

int read(byte[] b)
         throws java.io.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
Throws:
java.io.IOException

write

void write(byte[] b)
           throws java.io.IOException
Write a block of data to the back end.

Parameters:
b - the buffer to be sent
Throws:
java.io.IOException