public abstract class AbstractDataChain extends java.lang.Object implements AnonChannel, java.util.Observer, java.lang.Runnable
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 |
|---|---|
void |
close()
Closes the channel and releases all resources used.
|
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.
|
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.
|
boolean |
isClosed()
Returns if the channel is already closed, i.e. no data can be sent / recieved any more on this channel.
|
abstract void |
run() |
void |
update(java.util.Observable a_observedObject,
java.lang.Object a_message) |
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.Observerpublic 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.RunnableCopyright © 2023. All rights reserved.