Class Receiver.LoggingReceptionCallback<T>

java.lang.Object
de.iip_ecosphere.platform.transport.connectors.AbstractReceptionCallback<T>
de.iip_ecosphere.platform.services.environment.services.Receiver.LoggingReceptionCallback<T>
Type Parameters:
T - the type of data
All Implemented Interfaces:
de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<T>
Enclosing class:
Receiver

public static class Receiver.LoggingReceptionCallback<T> extends de.iip_ecosphere.platform.transport.connectors.AbstractReceptionCallback<T>
A generic logging reception callback.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • LoggingReceptionCallback

      public LoggingReceptionCallback(Class<T> cls, String stream, Consumer<T> consumer)
      Creates the callback.
      Parameters:
      cls - the class of data to receive
      stream - the stream to listen to
      consumer - the consumer to feed with the data
  • Method Details

    • getStream

      public String getStream()
      Returns the name of the stream/channel.
      Returns:
      the name of the stream/channel
    • received

      public void received(T data)