net.i2p.router.client
Class ClientWriterRunner

java.lang.Object
  extended by net.i2p.router.client.ClientWriterRunner
All Implemented Interfaces:
java.lang.Runnable

 class ClientWriterRunner
extends java.lang.Object
implements java.lang.Runnable

Async writer class so that if a client app hangs, they wont take down the whole router with them (since otherwise the JobQueue would block until the client reads from their i2cp socket, causing all sorts of bad shit to happen)

Author:
zzz modded to use concurrent

Constructor Summary
ClientWriterRunner(RouterContext context, ClientConnectionRunner runner)
           
 
Method Summary
 void addMessage(I2CPMessage msg)
          Add this message to the writer's queue
 void run()
           
 void stopWriting()
          No more messages - dont even try to send what we have
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientWriterRunner

public ClientWriterRunner(RouterContext context,
                          ClientConnectionRunner runner)
Method Detail

addMessage

public void addMessage(I2CPMessage msg)
Add this message to the writer's queue


stopWriting

public void stopWriting()
No more messages - dont even try to send what we have


run

public void run()
Specified by:
run in interface java.lang.Runnable