public abstract class WiretapOutputStream extends DelayOutputStream implements de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
ConnectionInterface
, die alle versendeten Telegramme zusätzlich in der abstrakten Methode telegramSend(DataTelegram)
ausgibt.
Mit dieser Klasse kann damit z. B. testweise die komplette Kommunikation zwischen Softwareeinheiten ausgegeben und analysiert werden.
DISABLE_DELAY
Constructor and Description |
---|
WiretapOutputStream(java.io.OutputStream outputStream,
long transmissionDelay,
double maxFlowRate) |
Modifier and Type | Method and Description |
---|---|
void |
connect(java.lang.String mainAdress,
int subAdressNumber) |
void |
disconnect() |
protected void |
enqueue(byte[] bytes) |
java.io.InputStream |
getInputStream() |
java.lang.String |
getMainAdress() |
java.io.OutputStream |
getOutputStream() |
int |
getSubAdressNumber() |
boolean |
isConnected() |
abstract void |
telegramSend(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram) |
close, write, write, write
public WiretapOutputStream(java.io.OutputStream outputStream, long transmissionDelay, double maxFlowRate)
public abstract void telegramSend(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram)
protected void enqueue(byte[] bytes) throws java.io.IOException
enqueue
in class DelayOutputStream
java.io.IOException
public java.lang.String getMainAdress()
getMainAdress
in interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
public int getSubAdressNumber()
getSubAdressNumber
in interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
public java.io.OutputStream getOutputStream()
getOutputStream
in interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
public java.io.InputStream getInputStream()
getInputStream
in interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
public void connect(java.lang.String mainAdress, int subAdressNumber) throws de.bsvrz.dav.daf.main.ConnectionException
connect
in interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
de.bsvrz.dav.daf.main.ConnectionException
public void disconnect()
disconnect
in interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
public boolean isConnected()
isConnected
in interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface