public abstract class AbstractDataChain extends java.lang.Object implements AnonChannel, java.util.Observer, java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
private class |
AbstractDataChain.DataChainOutputStreamImplementation |
| Modifier and Type | Field and Description |
|---|---|
private boolean |
m_chainClosed |
private IDataChannelCreator |
m_channelCreator |
private java.lang.Thread |
m_downstreamThread |
private DataChainErrorListener |
m_errorListener |
private DataChainInputStreamImplementation |
m_inputStream |
private IntegrityErrorListener |
m_integrityErrorListener |
private java.util.Vector |
m_messageQueuesNotifications |
private AbstractDataChain.DataChainOutputStreamImplementation |
m_outputStream |
HTTP, SMTP, SOCKS, TCP, UDP, UDP_OVER_TCP, UDP_OVER_UDP, VPN| Constructor and Description |
|---|
AbstractDataChain(IDataChannelCreator a_channelCreator,
DataChainErrorListener a_errorListener,
IntegrityErrorListener a_integrityErrorListener) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addInputStreamQueueEntry(DataChainInputStreamQueueEntry a_entry) |
void |
close()
Closes the channel and releases all resources used.
|
protected abstract void |
closeDataChain() |
protected AbstractDataChannel |
createDataChannel() |
abstract void |
createPacketPayload(DataChainSendOrderStructure a_order)
Creates the packet payload from the data stored in the given order.
|
java.io.InputStream |
getInputStream()
The returned InputStream could be used to receive data.
|
protected java.util.Vector |
getMessageQueuesNotificationsList() |
abstract int |
getOutputBlockSize()
Returns a value that indicates the current optimum size of data to write.
|
java.io.OutputStream |
getOutputStream()
The returned OutputStream could be used to send data.
|
protected void |
interruptDownstreamThread() |
boolean |
isClosed()
Returns if the channel is already closed, i.e. no data can be sent / recieved any more on this channel.
|
protected abstract void |
orderPacket(DataChainSendOrderStructure a_order) |
protected abstract void |
outputStreamClosed() |
protected void |
propagateConnectionError() |
protected void |
propagateIntegrityError(int a_iErrorCode) |
abstract void |
run() |
void |
update(java.util.Observable a_observedObject,
java.lang.Object a_message) |
private DataChainInputStreamImplementation m_inputStream
private AbstractDataChain.DataChainOutputStreamImplementation m_outputStream
private java.util.Vector m_messageQueuesNotifications
private IDataChannelCreator m_channelCreator
private DataChainErrorListener m_errorListener
private boolean m_chainClosed
private java.lang.Thread m_downstreamThread
private IntegrityErrorListener m_integrityErrorListener
public AbstractDataChain(IDataChannelCreator a_channelCreator, DataChainErrorListener a_errorListener, IntegrityErrorListener a_integrityErrorListener)
public java.io.InputStream getInputStream()
AnonChannelgetInputStream in interface AnonChannelpublic java.io.OutputStream getOutputStream()
AnonChannelgetOutputStream in interface AnonChannelpublic boolean isClosed()
AnonChannelisClosed in interface AnonChanneltrue, if the channel is already closedpublic void close()
AnonChannelclose in interface AnonChannelpublic void update(java.util.Observable a_observedObject,
java.lang.Object a_message)
update in interface java.util.Observerprotected java.util.Vector getMessageQueuesNotificationsList()
protected void addInputStreamQueueEntry(DataChainInputStreamQueueEntry a_entry)
protected AbstractDataChannel createDataChannel()
protected void interruptDownstreamThread()
protected void propagateConnectionError()
protected void propagateIntegrityError(int a_iErrorCode)
public abstract int getOutputBlockSize()
AnonChannelgetOutputBlockSize in interface AnonChannelpublic abstract void createPacketPayload(DataChainSendOrderStructure a_order)
The processed data will be stored in the channel cell of the order.
a_order - public abstract void run()
run in interface java.lang.Runnableprotected abstract void orderPacket(DataChainSendOrderStructure a_order)
protected abstract void outputStreamClosed()
throws java.io.IOException
java.io.IOExceptionprotected abstract void closeDataChain()
Copyright © 2023. All rights reserved.