anon.client
Class SequentialChannelDataChain
java.lang.Object
anon.client.AbstractDataChain
anon.client.SequentialChannelDataChain
- All Implemented Interfaces:
- AnonChannel, java.lang.Runnable, java.util.Observer
public class SequentialChannelDataChain
- extends AbstractDataChain
- Author:
- Stefan Lieske
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHAIN_ID_LENGTH
private static final int CHAIN_ID_LENGTH
- See Also:
- Constant Field Values
FLAG_UNKNOWN_CHAIN_ID
private static final short FLAG_UNKNOWN_CHAIN_ID
- See Also:
- Constant Field Values
FLAG_CONNECTION_ERROR
private static final short FLAG_CONNECTION_ERROR
- See Also:
- Constant Field Values
FLAG_NEW_CHAIN
private static final short FLAG_NEW_CHAIN
- See Also:
- Constant Field Values
FLAG_FAST_RESPONSE
private static final short FLAG_FAST_RESPONSE
- See Also:
- Constant Field Values
FLAG_STREAM_CLOSED
private static final short FLAG_STREAM_CLOSED
- See Also:
- Constant Field Values
m_associatedChannels
private java.util.Vector m_associatedChannels
m_firstDownstreamPacket
private boolean m_firstDownstreamPacket
m_chainId
private volatile byte[] m_chainId
m_maximumOutputBlocksize
private int m_maximumOutputBlocksize
m_sendSynchronization
private java.lang.Object m_sendSynchronization
m_chainClosed
private volatile boolean m_chainClosed
m_chainTimeout
private long m_chainTimeout
SequentialChannelDataChain
public SequentialChannelDataChain(IDataChannelCreator a_channelCreator,
DataChainErrorListener a_errorListener,
long a_chainTimeout)
getOutputBlockSize
public int getOutputBlockSize()
- Description copied from interface:
AnonChannel
- Returns a value that indicates the current optimum size of data to write.. Because often
anon services transport the data splited into packets for optimum performance
it may be good to send data according to the packet size to avoid unneccessary overheads.
- Specified by:
getOutputBlockSize
in interface AnonChannel
- Specified by:
getOutputBlockSize
in class AbstractDataChain
- Returns:
- the current optimum size for output data. If 1 is returned the size does not matter.
createPacketPayload
public void createPacketPayload(DataChainSendOrderStructure a_order)
- Specified by:
createPacketPayload
in class AbstractDataChain
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
- Specified by:
run
in class AbstractDataChain
orderPacket
protected void orderPacket(DataChainSendOrderStructure a_order)
- Specified by:
orderPacket
in class AbstractDataChain
orderPacketInternal
private void orderPacketInternal(DataChainSendOrderStructure a_order,
boolean a_sendUpstreamClose,
boolean a_enforceFastResponse)
outputStreamClosed
protected void outputStreamClosed()
throws java.io.IOException
- Specified by:
outputStreamClosed
in class AbstractDataChain
- Throws:
java.io.IOException
closeDataChain
protected void closeDataChain()
- Specified by:
closeDataChain
in class AbstractDataChain