anon.client
Class SimulatedLimitedDataChannel

java.lang.Object
  extended by anon.client.AbstractChannel
      extended by anon.client.AbstractDataChannel
          extended by anon.client.SimulatedLimitedDataChannel
All Implemented Interfaces:
java.lang.Runnable

public class SimulatedLimitedDataChannel
extends AbstractDataChannel
implements java.lang.Runnable

Author:
Stefan Lieske

Field Summary
private static short FLAG_CHANNEL_CLOSE
           
private static short FLAG_CHANNEL_DATA
           
private static short FLAG_CHANNEL_OPEN
           
private  boolean m_channelClosed
           
private  boolean m_channelOpened
           
private  long m_channelTimeout
           
private  int m_downstreamPackets
           
private  java.lang.Object m_internalSynchronization
           
private  int m_receivedPackets
           
(package private)  java.lang.Thread m_timeoutSupervisionThread
           
(package private)  java.lang.Object m_timeoutSynchronization
           
 
Fields inherited from class anon.client.AbstractChannel
m_parentMultiplexer
 
Constructor Summary
SimulatedLimitedDataChannel(int a_channelId, Multiplexer a_parentMultiplexer, AbstractDataChain a_parentDataChain, MixCipherChain a_mixCipherChain, int a_downstreamPackets, long a_channelTimeout)
           
 
Method Summary
protected  void handleReceivedPacket(MixPacket a_mixPacket)
           
 void multiplexerClosed()
          This method is called on every channel in the channel-table after the multiplexer is closed.
 void organizeChannelClose()
           
 boolean processSendOrder(DataChainSendOrderStructure a_order)
           
 void run()
           
 
Methods inherited from class anon.client.AbstractDataChannel
createAndSendMixPacket, getChannelMessageQueue, getNextPacketRecommandedOutputBlocksize, processReceivedPacket
 
Methods inherited from class anon.client.AbstractChannel
createEmptyMixPacket, deleteChannel, isClosed, sendPacket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_CHANNEL_DATA

private static final short FLAG_CHANNEL_DATA
See Also:
Constant Field Values

FLAG_CHANNEL_CLOSE

private static final short FLAG_CHANNEL_CLOSE
See Also:
Constant Field Values

FLAG_CHANNEL_OPEN

private static final short FLAG_CHANNEL_OPEN
See Also:
Constant Field Values

m_internalSynchronization

private java.lang.Object m_internalSynchronization

m_channelOpened

private boolean m_channelOpened

m_downstreamPackets

private int m_downstreamPackets

m_channelTimeout

private long m_channelTimeout

m_receivedPackets

private int m_receivedPackets

m_timeoutSupervisionThread

java.lang.Thread m_timeoutSupervisionThread

m_timeoutSynchronization

java.lang.Object m_timeoutSynchronization

m_channelClosed

private volatile boolean m_channelClosed
Constructor Detail

SimulatedLimitedDataChannel

public SimulatedLimitedDataChannel(int a_channelId,
                                   Multiplexer a_parentMultiplexer,
                                   AbstractDataChain a_parentDataChain,
                                   MixCipherChain a_mixCipherChain,
                                   int a_downstreamPackets,
                                   long a_channelTimeout)
Method Detail

organizeChannelClose

public void organizeChannelClose()
Specified by:
organizeChannelClose in class AbstractDataChannel

processSendOrder

public boolean processSendOrder(DataChainSendOrderStructure a_order)
Specified by:
processSendOrder in class AbstractDataChannel

multiplexerClosed

public void multiplexerClosed()
Description copied from class: AbstractChannel
This method is called on every channel in the channel-table after the multiplexer is closed. Children of AbstractChannel should overwrite this method. It's not necessary to delete the channel from the channel-table but maybe there are some other tasks to do.

Overrides:
multiplexerClosed in class AbstractChannel

handleReceivedPacket

protected void handleReceivedPacket(MixPacket a_mixPacket)
Specified by:
handleReceivedPacket in class AbstractDataChannel

run

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