public class ApacheCommonsFileTailingMessageProducer extends FileTailingMessageProducerSupport implements org.apache.commons.io.input.TailerListener
FileTailingMessageProducerSupport.FileTailingEvent, FileTailingMessageProducerSupport.FileTailingIdleEventlifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerDEFAULT_PHASE| Constructor and Description |
|---|
ApacheCommonsFileTailingMessageProducer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Takes no action by default.
|
protected void |
doStop()
Takes no action by default.
|
void |
fileNotFound() |
void |
fileRotated() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
void |
handle(Exception ex) |
void |
handle(String line) |
void |
init(org.apache.commons.io.input.Tailer tailer) |
void |
setEnd(boolean end)
If true, tail from the end of the file, otherwise
include all lines from the beginning.
|
void |
setPollingDelay(long pollingDelay)
The delay between checks of the file for new content in milliseconds.
|
void |
setReopen(boolean reopen)
If true, close and reopen the file between reading chunks;
default false.
|
getFile, getMissingFileDelay, getTaskExecutor, publish, send, setApplicationEventPublisher, setFile, setIdleEventInterval, setTailAttemptsDelay, setTaskExecutorafterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getMessagingTemplate, getOutputChannel, onInit, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrackdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBeanName, getComponentNamepublic ApacheCommonsFileTailingMessageProducer()
public void setPollingDelay(long pollingDelay)
pollingDelay - The delay.public void setEnd(boolean end)
end - true or falsepublic void setReopen(boolean reopen)
reopen - true or false.public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class FileTailingMessageProducerSupportprotected void doStart()
MessageProducerSupportdoStart in class FileTailingMessageProducerSupportprotected void doStop()
MessageProducerSupportdoStop in class FileTailingMessageProducerSupportpublic void init(org.apache.commons.io.input.Tailer tailer)
init in interface org.apache.commons.io.input.TailerListenerpublic void fileNotFound()
fileNotFound in interface org.apache.commons.io.input.TailerListenerpublic void fileRotated()
fileRotated in interface org.apache.commons.io.input.TailerListenerpublic void handle(String line)
handle in interface org.apache.commons.io.input.TailerListenerpublic void handle(Exception ex)
handle in interface org.apache.commons.io.input.TailerListener