Class TcpRecordReader

java.lang.Object
kieker.monitoring.core.controller.tcp.TcpRecordReader
All Implemented Interfaces:
java.lang.Runnable

public class TcpRecordReader
extends java.lang.Object
implements java.lang.Runnable
Represents a TCP reader which reads and reconstructs Kieker records from a single TCP stream.
Since:
1.13
Author:
Christian Wulf (chw)
  • Constructor Summary

    Constructors 
    Constructor Description
    TcpRecordReader​(int port, int bufferCapacity, org.slf4j.Logger logger, boolean respawn, IRecordReceivedListener listener)
    Create single socket reader.
    TcpRecordReader​(int port, int bufferCapacity, org.slf4j.Logger logger, IRecordReceivedListener listener)
    Create single socket reader.
  • Method Summary

    Modifier and Type Method Description
    int getPort()  
    boolean onBufferReceived​(java.nio.ByteBuffer buffer)  
    void run()  
    void terminate()
    Gracefully terminates this TCP reader.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TcpRecordReader

      public TcpRecordReader​(int port, int bufferCapacity, org.slf4j.Logger logger, IRecordReceivedListener listener)
      Create single socket reader.
      Parameters:
      port - port to listen to
      bufferCapacity - buffer capacity
      logger - logger to be used
      listener - listener to trigger on received records
    • TcpRecordReader

      public TcpRecordReader​(int port, int bufferCapacity, org.slf4j.Logger logger, boolean respawn, IRecordReceivedListener listener)
      Create single socket reader.
      Parameters:
      port - port to listen to
      bufferCapacity - buffer capacity
      logger - logger to be used
      respawn - true when reader should respawn after lost connection
      listener - listener to trigger on received records
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable
    • terminate

      public void terminate()
      Gracefully terminates this TCP reader.
    • getPort

      public int getPort()
    • onBufferReceived

      public boolean onBufferReceived​(java.nio.ByteBuffer buffer)