net.i2p.router.tunnel
Class FragmentTest

java.lang.Object
  extended bynet.i2p.router.tunnel.FragmentTest
Direct Known Subclasses:
BatchedFragmentTest

public class FragmentTest
extends java.lang.Object

Simple test to see if the fragmentation is working, testing the preprocessor, FragmentHandler, and FragmentedMessage operation.


Nested Class Summary
protected  class FragmentTest.DefragmentedReceiverImpl
           
protected  class FragmentTest.ReceiverImpl
           
protected  class FragmentTest.SenderImpl
           
 
Field Summary
protected  I2PAppContext _context
           
protected  Log _log
           
 
Constructor Summary
FragmentTest()
           
 
Method Summary
protected  TunnelGateway.Pending createPending(int size, boolean includeRouter, boolean includeTunnel)
           
protected  TunnelGateway.QueuePreprocessor createPreprocessor(I2PAppContext ctx)
           
static void main(java.lang.String[] args)
           
 void runDelayed()
          Send a fragmented message, except wait a while between each fragment, causing the defragmentation to fail (since the fragments will expire)
 void runMultiple()
          Send a message with two fragments through with no delay
 void runSingle()
          Send a message that fits inside a single fragment through
 void runTests()
           
 void runVaried()
           
protected  boolean runVaried(int size, boolean includeRouter, boolean includeTunnel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_context

protected I2PAppContext _context

_log

protected Log _log
Constructor Detail

FragmentTest

public FragmentTest()
Method Detail

createPreprocessor

protected TunnelGateway.QueuePreprocessor createPreprocessor(I2PAppContext ctx)

runSingle

public void runSingle()
Send a message that fits inside a single fragment through


runMultiple

public void runMultiple()
Send a message with two fragments through with no delay


runDelayed

public void runDelayed()
Send a fragmented message, except wait a while between each fragment, causing the defragmentation to fail (since the fragments will expire)


runVaried

public void runVaried()

runVaried

protected boolean runVaried(int size,
                            boolean includeRouter,
                            boolean includeTunnel)

createPending

protected TunnelGateway.Pending createPending(int size,
                                              boolean includeRouter,
                                              boolean includeTunnel)

runTests

public void runTests()

main

public static void main(java.lang.String[] args)