|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.mud.jta.Plugin | +--de.mud.jta.plugin.Timeout
The timeout plugin looks at the incoming and outgoing data stream and tries to close the connection gracefully if the timeout occured or if not graceful exit command was configured simply closed the connection.
Maintainer: Matthias L. Jugel
Field Summary | |
protected int |
timeout
|
protected java.lang.String |
timeoutCommand
|
protected java.lang.Thread |
timeoutThread
|
protected java.lang.String |
timeoutWarning
|
Fields inherited from class de.mud.jta.Plugin |
bus, id |
Constructor Summary | |
Timeout(PluginBus bus,
java.lang.String id)
Create the new timeout plugin. |
Method Summary | |
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. |
Methods inherited from class de.mud.jta.Plugin |
error, getId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int timeout
protected java.lang.String timeoutCommand
protected java.lang.String timeoutWarning
protected java.lang.Thread timeoutThread
Constructor Detail |
public Timeout(PluginBus bus, java.lang.String id)
Method Detail |
public void run()
run
in interface java.lang.Runnable
public void connect(java.lang.String host, int port) throws java.io.IOException
connect
in interface SocketListener
java.io.IOException
public void disconnect() throws java.io.IOException
disconnect
in interface SocketListener
java.io.IOException
public void setFilterSource(FilterPlugin plugin)
FilterPlugin
setFilterSource
in interface FilterPlugin
plugin
- the data sourcepublic FilterPlugin getFilterSource()
getFilterSource
in interface FilterPlugin
public int read(byte[] b) throws java.io.IOException
FilterPlugin
read
in interface FilterPlugin
b
- the buffer to read the data into
java.io.IOException
public void write(byte[] b) throws java.io.IOException
FilterPlugin
write
in interface FilterPlugin
b
- the buffer to be sent
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |