public abstract class LogStreamManager extends LogFileManager
LogFileManager that reads logs from a live stream. Such Manager
cannot read backward or forward, and, most of the time, cannot read the next data until it's
available (blocking read). This typically occurs when reading through a pipe, socket, serial
port, ...LogFileManager.ManagerSpecVersionREAD_MUTEX| Constructor and Description |
|---|
LogStreamManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteFile()
Method overriding parent method
LogFileManager.deleteFile() to always return false |
boolean |
flushFile()
Method overriding parent method
LogFileManager.flushFile() to always return true |
long |
getCurrentFileSize()
Method overriding parent method
LogFileManager.getCurrentFileSize() to always return -1 |
long |
getCurrentOffset()
Method overriding parent method
LogFileManager.getCurrentOffset() to always throw UnsupportedOperationException |
boolean |
isLiveStream()
Method overriding parent method
LogFileManager.isLiveStream() to always return true |
byte[] |
readFileHeader(int pNbBytes)
Method overriding parent method
LogFileManager.readFileHeader(int) to always throw UnsupportedOperationException |
AutoRefreshLineInfo |
readLineAtOffset(long pOffset)
Method overriding parent method
LogFileManager.readLineAtOffset(long) to always throw UnsupportedOperationException |
abstract void |
setHasReadTimeout(boolean pHasReadTimeout)
Called by LogMX to tell the Manager if next reads shall be
blocking calls or not.
If LogMX expects that LogFileManager.readLine() or LogFileManager.readEntry()
shall be blocking until some data is read, then the parameter pHasReadTimeout will
be false. |
boolean |
supportFileDelete()
Method overriding parent method
LogFileManager.supportFileDelete() to always return false |
boolean |
supportFileFlush()
Method overriding parent method
LogFileManager.supportFileFlush() to always return true |
boolean |
supportHeaderReading()
Method overriding parent method
LogFileManager.supportHeaderReading() to always return false |
boolean |
supportRandomAccess()
Method overriding parent method
LogFileManager.supportRandomAccess() to always return false |
canUseParser, createNewEntryForExtraction, getAutoRefreshDelay, getCompressFormat, getCompressFormatFromFileName, getConnectionTimeout, getCurrentFileInfo, getCurrentFileLastModifDate, getCurrentURL, getDecompressedStream, getDecompressedStream, getEncoding, getFileTypeIcon, getFileTypeIcon32x32, getIconFile, getLogEntriesInfoProvider, getName, getOrAskUserPassword, getProtocolName, getProxySettings, getShortFilename, getSpecificationVersion, getTemplateLogURL, getURLFromLogURL, getURLPattern, init, newEncodingDetected, prepareForReading, readEntry, readLine, releaseResources, supportLogEntriesExtractionpublic abstract void setHasReadTimeout(boolean pHasReadTimeout)
LogFileManager.readLine() or LogFileManager.readEntry()
shall be blocking until some data is read, then the parameter pHasReadTimeout will
be false. Otherwise, the Manager shall use a timeout mechanism
(e.g. java.net.Socket.setSoTimeout()) with a timeout value around 100ms.pHasReadTimeout - true if a timeout shall be used when reading underlying resource,
or false if next reads shall be blocking.ManagerSpecVersion)public final boolean isLiveStream()
LogFileManager.isLiveStream() to always return trueisLiveStream in class LogFileManagertrueManagerSpecVersion)LogFileManager.isLiveStream()public final long getCurrentFileSize()
LogFileManager.getCurrentFileSize() to always return -1getCurrentFileSize in class LogFileManager-1 (live streams don't have a size)ManagerSpecVersion)LogFileManager.getCurrentFileSize()public final long getCurrentOffset()
LogFileManager.getCurrentOffset() to always throw UnsupportedOperationExceptiongetCurrentOffset in class LogFileManagerUnsupportedOperationException (live streams don't have to be aware of current offset)ManagerSpecVersion)LogFileManager.getCurrentOffset()public final AutoRefreshLineInfo readLineAtOffset(long pOffset) throws Exception
LogFileManager.readLineAtOffset(long) to always throw UnsupportedOperationExceptionreadLineAtOffset in class LogFileManagerpOffset - Starting offsetUnsupportedOperationException (live streams don't have to be aware of current offset)Exception - If Manager could not read bytesManagerSpecVersion)LogFileManager.readLineAtOffset(long)public final byte[] readFileHeader(int pNbBytes)
throws Exception
LogFileManager.readFileHeader(int) to always throw UnsupportedOperationExceptionreadFileHeader in class LogFileManagerpNbBytes - Number of bytes to read. If negative, Manager must read as much bytes as possible
(for example, up to the end of file)UnsupportedOperationException (live streams don't have to support file header reading)Exception - If Manager could not read bytesManagerSpecVersion)LogFileManager.readFileHeader(int)public final boolean supportFileDelete()
LogFileManager.supportFileDelete() to always return falsesupportFileDelete in class LogFileManagerfalse(live streams don't have to support file deletion)ManagerSpecVersion)LogFileManager.supportFileDelete()public final boolean supportFileFlush()
LogFileManager.supportFileFlush() to always return truesupportFileFlush in class LogFileManagertrue since LogMX will only flush read entries from its
GUI, and stream is not impacted (no job to be done by Manager, that's why this method is final).ManagerSpecVersion)LogFileManager.supportFileFlush()public final boolean supportHeaderReading()
LogFileManager.supportHeaderReading() to always return falsesupportHeaderReading in class LogFileManagerfalse(live streams don't have to support header reading)ManagerSpecVersion)LogFileManager.supportHeaderReading()public final boolean supportRandomAccess()
LogFileManager.supportRandomAccess() to always return falsesupportRandomAccess in class LogFileManagerfalse(live streams don't have to support random access)ManagerSpecVersion)LogFileManager.supportRandomAccess()public final boolean deleteFile()
LogFileManager.deleteFile() to always return falsedeleteFile in class LogFileManagerfalse(live streams don't have to support file deletion)ManagerSpecVersion)LogFileManager.deleteFile()public final boolean flushFile()
LogFileManager.flushFile() to always return trueflushFile in class LogFileManagertrue since LogMX will only flush read entries from its
GUI, and stream is not impacted (no job to be done by Manager, that's why this method is final).ManagerSpecVersion)LogFileManager.flushFile()Copyright © 2025 LightySoft. All rights reserved. [LogMX v8.4.0 (Jan 3, 2025)]