de.mud.jta.plugin
public class Timeout extends Plugin implements FilterPlugin, SocketListener, java.lang.Runnable
Maintainer: Matthias L. Jugel
| Modifier and Type | Field and Description |
|---|---|
protected int |
timeout |
protected java.lang.String |
timeoutCommand |
protected java.lang.Thread |
timeoutThread |
protected java.lang.String |
timeoutWarning |
| Constructor and Description |
|---|
Timeout(PluginBus bus,
java.lang.String id)
Create the new timeout plugin.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.lang.String host,
int port)
Start the timeout countdown.
|
void |
disconnect()
Stop the timeout
|
FilterPlugin |
getFilterSource() |
int |
read(byte[] b)
Read a block of data from the back end.
|
void |
run()
Sleep for the timeout beeing.
|
void |
setFilterSource(FilterPlugin plugin)
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.
|
protected int timeout
protected java.lang.String timeoutCommand
protected java.lang.String timeoutWarning
protected java.lang.Thread timeoutThread
public Timeout(PluginBus bus, java.lang.String id)
public void run()
run in interface java.lang.Runnablepublic void connect(java.lang.String host,
int port)
throws java.io.IOException
connect in interface SocketListenerjava.io.IOExceptionpublic void disconnect()
throws java.io.IOException
disconnect in interface SocketListenerjava.io.IOExceptionpublic void setFilterSource(FilterPlugin plugin)
FilterPluginsetFilterSource in interface FilterPluginplugin - the data sourcepublic FilterPlugin getFilterSource()
getFilterSource in interface FilterPluginpublic int read(byte[] b)
throws java.io.IOException
FilterPluginread in interface FilterPluginb - the buffer to read the data intojava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
FilterPluginwrite in interface FilterPluginb - the buffer to be sentjava.io.IOException