public class ApacheCommonsFileTailingMessageProducer extends FileTailingMessageProducerSupport implements org.apache.commons.io.input.TailerListener
FileTailingMessageProducerSupport.FileTailingEvent
Constructor and Description |
---|
ApacheCommonsFileTailingMessageProducer() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
void |
fileNotFound() |
void |
fileRotated() |
java.lang.String |
getComponentType() |
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
doStop, getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, toString
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()
getComponentType
in interface org.springframework.integration.support.context.NamedComponent
getComponentType
in class FileTailingMessageProducerSupport
protected void doStart()
doStart
in class org.springframework.integration.endpoint.MessageProducerSupport
protected void doStop()
doStop
in class org.springframework.integration.endpoint.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