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() |
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, setTailAttemptsDelay, setTaskExecutor
onInit, sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, 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 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(String line)
handle
in interface org.apache.commons.io.input.TailerListener
public void handle(Exception ex)
handle
in interface org.apache.commons.io.input.TailerListener