public class ApacheCommonsFileTailingMessageProducer extends FileTailingMessageProducerSupport implements org.apache.commons.io.input.TailerListener
FileTailingMessageProducerSupport.FileTailingEvent
logger
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() |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
void |
handle(java.lang.Exception ex) |
void |
handle(java.lang.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, setTailAttemptsDelay, setTaskExecutor
onInit, sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public 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 java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class FileTailingMessageProducerSupport
protected void doStart()
MessageProducerSupport
doStart
in class MessageProducerSupport
protected void doStop()
MessageProducerSupport
doStop
in class MessageProducerSupport
public void init(org.apache.commons.io.input.Tailer tailer)
init
in interface org.apache.commons.io.input.TailerListener
public void fileNotFound()
fileNotFound
in interface org.apache.commons.io.input.TailerListener
public void fileRotated()
fileRotated
in interface org.apache.commons.io.input.TailerListener
public void handle(java.lang.String line)
handle
in interface org.apache.commons.io.input.TailerListener
public void handle(java.lang.Exception ex)
handle
in interface org.apache.commons.io.input.TailerListener