org.objectweb.joram.mom.proxies.tcp

Class TcpWriter

Implemented Interfaces:
Runnable

public class TcpWriter
extends Daemon

The activity responsible for getting the replies from the user's proxy and writing them to the socket.

Field Summary

Fields inherited from class fr.dyade.aaa.util.Daemon

canStop, group, logmon, priority, running, thread

Constructor Summary

TcpWriter(IOControl ioctrl, AckedQueue replyQueue, TcpConnection tcpConnection)
Creates a new writer.

Method Summary

protected void
close()
Releases any resources attached to this daemon.
void
run()
protected void
shutdown()
Interupts a thread that waits for long periods.

Methods inherited from class fr.dyade.aaa.util.Daemon

close, finish, getName, interrupt, isCurrentThread, isRunning, setDaemon, setPriority, setThreadGroup, shutdown, start, stop, toString

Constructor Details

TcpWriter

public TcpWriter(IOControl ioctrl,
                 AckedQueue replyQueue,
                 TcpConnection tcpConnection)
            throws IOException
Creates a new writer.

Parameters:
tcpConnection - the TCP connection

Method Details

close

protected void close()
Releases any resources attached to this daemon. Be careful, its method should be called more than one time.
Overrides:
close in interface Daemon


run

public void run()


shutdown

protected void shutdown()
Interupts a thread that waits for long periods. In some cases, we must use application specific tricks. For example, if a thread is waiting on a known socket, we have to close the socket to cause the thread to return immediately. Unfortunately, there really isn't any technique that works in general.
Overrides:
shutdown in interface Daemon


Copyright B) 2004 Scalagent - All rights reserved