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,java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public abstract class WiretapOutputStream extends DelayOutputStream implements de.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
Abstrakte Implementierung vonConnectionInterface, die alle versendeten Telegramme zusätzlich in der abstrakten MethodetelegramSend(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
Constructors Constructor Description WiretapOutputStream(java.io.OutputStream outputStream, long transmissionDelay, double maxFlowRate)
-
Method Summary
Modifier and Type Method Description voidconnect(java.lang.String mainAdress, int subAdressNumber)voiddisconnect()protected voidenqueue(byte[] bytes)java.io.InputStreamgetInputStream()java.lang.StringgetMainAdress()java.io.OutputStreamgetOutputStream()intgetSubAdressNumber()booleanisConnected()abstract voidtelegramSend(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram)-
Methods inherited from class de.kappich.pat.testumg.util.connections.DelayOutputStream
close, write, write, write
-
-
-
-
Method Detail
-
telegramSend
public abstract void telegramSend(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram)
-
enqueue
protected void enqueue(byte[] bytes) throws java.io.IOException- Overrides:
enqueuein classDelayOutputStream- Throws:
java.io.IOException
-
getMainAdress
public java.lang.String 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
public java.io.OutputStream getOutputStream()
- Specified by:
getOutputStreamin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-
getInputStream
public java.io.InputStream getInputStream()
- Specified by:
getInputStreamin interfacede.bsvrz.dav.daf.communication.lowLevel.ConnectionInterface
-
connect
public void connect(java.lang.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
-
-