Class TransportLogger.TransportHandler<T>
- java.lang.Object
-
- de.iip_ecosphere.platform.services.environment.TransportLogger.TransportHandler<T>
-
- Type Parameters:
T- the type of data to be handled
- All Implemented Interfaces:
de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<T>
- Enclosing class:
- TransportLogger
protected static class TransportLogger.TransportHandler<T> extends java.lang.Object implements de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<T>Implements a generic transport handler for logging.- Author:
- Holger Eichelberger, SSE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTransportHandler(java.lang.String stream, java.lang.Class<T> cls, java.util.function.Consumer<T> cons)Creates a handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach()Detaches the handler fromTransport.java.lang.Class<T>getType()voidinitialize()Initializes the handler.voidreceived(T data)
-
-
-
Method Detail
-
initialize
public void initialize() throws java.io.IOExceptionInitializes the handler.- Throws:
java.io.IOException- if registering the handler as reception callback fails
-
detach
public void detach() throws java.io.IOExceptionDetaches the handler fromTransport.- Throws:
java.io.IOException- if detaching the handler as reception callback fails
-
received
public void received(T data)
- Specified by:
receivedin interfacede.iip_ecosphere.platform.transport.connectors.ReceptionCallback<T>
-
-