Class LogTailerListener
java.lang.Object
de.iip_ecosphere.platform.services.spring.LogTailerListener
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.commons.TailerListener,Closeable,AutoCloseable
class LogTailerListener
extends Object
implements de.iip_ecosphere.platform.support.commons.TailerListener, Closeable
A log tailer listener connected to a transport converter sender.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate de.iip_ecosphere.platform.services.environment.services.Sender<String> private de.iip_ecosphere.platform.support.commons.Tailerprivate int -
Constructor Summary
ConstructorsConstructorDescriptionLogTailerListener(de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup aas, de.iip_ecosphere.platform.transport.connectors.TransportSetup transport, String path) Creates a log tailer listener. -
Method Summary
Modifier and TypeMethodDescription(package private) voidattachTailer(de.iip_ecosphere.platform.support.commons.Tailer tailer) Attaches the handling tailer.voidclose()(package private) intDecreases a further use.getURI()Returns the URI that this sender is connected to.void(package private) intIndicates a further use and increases the usage count.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.support.commons.TailerListener
endOfFileReached, fileNotFound, fileRotated
-
Field Details
-
sender
-
tailer
private de.iip_ecosphere.platform.support.commons.Tailer tailer -
usageCount
private int usageCount
-
-
Constructor Details
-
LogTailerListener
LogTailerListener(de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup aas, de.iip_ecosphere.platform.transport.connectors.TransportSetup transport, String path) Creates a log tailer listener.- Parameters:
aas- the AAS setup for AAS-based senderstransport- the transport setup for transport-based senderspath- within the mechanism to identify the data, may be an id short, an URI sub-path etc.
-
-
Method Details
-
getURI
Returns the URI that this sender is connected to.- Returns:
- the URI connected to (may be null)
-
handle
- Specified by:
handlein interfacede.iip_ecosphere.platform.support.commons.TailerListener
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
attachTailer
void attachTailer(de.iip_ecosphere.platform.support.commons.Tailer tailer) Attaches the handling tailer.- Parameters:
tailer- the tailer
-
increaseUsageCount
int increaseUsageCount()Indicates a further use and increases the usage count.- Returns:
- the actual usage count
-
decreaseUsageCount
int decreaseUsageCount()Decreases a further use.- Returns:
- the actual usage count
-