Class WiretapOutputStream
java.lang.Object
java.io.OutputStream
de.kappich.pat.testumg.util.connections.DelayOutputStream
de.kappich.pat.testumg.util.connections.WiretapOutputStream
- All Implemented Interfaces:
de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface,Closeable,Flushable,AutoCloseable
public abstract class WiretapOutputStream
extends DelayOutputStream
implements de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
Abstrakte Implementierung von
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.
-
Field Summary
Fields inherited from class de.kappich.pat.testumg.util.connections.DelayOutputStream
DISABLE_DELAY -
Constructor Summary
ConstructorsConstructorDescriptionWiretapOutputStream(OutputStream outputStream, long transmissionDelay, double maxFlowRate) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected voidenqueue(byte[] bytes) intbooleanabstract voidtelegramSend(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram) Methods inherited from class de.kappich.pat.testumg.util.connections.DelayOutputStream
close, write, write, writeMethods inherited from class java.io.OutputStream
flush, nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
isLoopback
-
Constructor Details
-
WiretapOutputStream
-
-
Method Details
-
telegramSend
public abstract void telegramSend(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram) -
enqueue
- Overrides:
enqueuein classDelayOutputStream- Throws:
IOException
-
getMainAdress
- Specified by:
getMainAdressin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-
getSubAdressNumber
public int getSubAdressNumber()- Specified by:
getSubAdressNumberin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-
getOutputStream
- Specified by:
getOutputStreamin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-
getInputStream
- Specified by:
getInputStreamin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-
connect
public void connect(String mainAdress, int subAdressNumber) throws de.bsvrz.dav.daf.main.ConnectionException - Specified by:
connectin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface- Throws:
de.bsvrz.dav.daf.main.ConnectionException
-
disconnect
public void disconnect()- Specified by:
disconnectin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-