public class TailAdapterSpec extends MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
MessageProducerSpec
for file tailing adapters.logger, PARSER, target
Modifier and Type | Method and Description |
---|---|
TailAdapterSpec |
autoStartup(boolean autoStartup) |
TailAdapterSpec |
delay(long delay)
The delay between checks of the file for new content in milliseconds.
|
protected FileTailingMessageProducerSupport |
doGet() |
TailAdapterSpec |
enableStatusReader(boolean enableStatusReader)
This field control the stderr events.
|
TailAdapterSpec |
end(boolean end)
If
true , tail from the end of the file, otherwise include all lines from the beginning. |
TailAdapterSpec |
errorChannel(org.springframework.messaging.MessageChannel errorChannel)
Configure the
MessageChannel to which error messages will be sent. |
TailAdapterSpec |
fileDelay(long fileDelay)
The delay in milliseconds between attempts to tail a non-existent file,
or between attempts to execute a process if it fails for any reason.
|
TailAdapterSpec |
id(java.lang.String id)
Configure the component identifier.
|
TailAdapterSpec |
idleEventInterval(long idleEventInterval)
Specify the idle interval before start sending idle events.
|
TailAdapterSpec |
nativeOptions(java.lang.String nativeOptions)
Specify the options string for native
tail command. |
TailAdapterSpec |
outputChannel(org.springframework.messaging.MessageChannel outputChannel)
Specify the
outputChannel for the
MessageProducer |
TailAdapterSpec |
phase(int phase) |
TailAdapterSpec |
reopen(boolean reopen)
If
true , close and reopen the file between reading chunks. |
TailAdapterSpec |
taskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Configure a task executor.
|
TailAdapterSpec |
taskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
Set a task scheduler - defaults to the integration 'taskScheduler'.
|
errorChannel, errorMessageStrategy, outputChannel, sendTimeout, shouldTrack
_this, afterPropertiesSet, destroy, get, getId, getObject, getObjectType, isSingleton
public TailAdapterSpec nativeOptions(java.lang.String nativeOptions)
tail
command.nativeOptions
- the nativeOptions.OSDelegatingFileTailingMessageProducer.setOptions(String)
public TailAdapterSpec enableStatusReader(boolean enableStatusReader)
enableStatusReader
- boolean to enable or disable events from stderr.public TailAdapterSpec idleEventInterval(long idleEventInterval)
idleEventInterval
- interval in ms for the event idle time.public TailAdapterSpec taskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
SimpleAsyncTaskExecutor
.taskExecutor
- the taskExecutor.public TailAdapterSpec taskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
taskScheduler
- the taskScheduler.public TailAdapterSpec delay(long delay)
delay
- the delay.ApacheCommonsFileTailingMessageProducer.setPollingDelay(long)
public TailAdapterSpec fileDelay(long fileDelay)
fileDelay
- the fileDelay.FileTailingMessageProducerSupport.setTailAttemptsDelay(long)
public TailAdapterSpec end(boolean end)
true
, tail from the end of the file, otherwise include all lines from the beginning.
Default true
.end
- the end.ApacheCommonsFileTailingMessageProducer.setEnd(boolean)
public TailAdapterSpec reopen(boolean reopen)
true
, close and reopen the file between reading chunks.
Default false
.reopen
- the reopen.ApacheCommonsFileTailingMessageProducer.setReopen(boolean)
public TailAdapterSpec id(java.lang.String id)
MessageProducerSpec
beanName
to register the
bean in the application context for this component.
Configure the message producer's bean name.id
in class MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
id
- the id.public TailAdapterSpec phase(int phase)
phase
in class MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
phase
- the phase.SmartLifecycle
public TailAdapterSpec autoStartup(boolean autoStartup)
autoStartup
in class MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
autoStartup
- the autoStartup.SmartLifecycle
public TailAdapterSpec outputChannel(org.springframework.messaging.MessageChannel outputChannel)
MessageProducerSpec
outputChannel
for the
MessageProducer
outputChannel
in class MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
outputChannel
- the outputChannel.MessageProducerSupport.setOutputChannel(MessageChannel)
public TailAdapterSpec errorChannel(org.springframework.messaging.MessageChannel errorChannel)
MessageProducerSpec
MessageChannel
to which error messages will be sent.errorChannel
in class MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
errorChannel
- the errorChannel.MessageProducerSupport.setErrorChannel(MessageChannel)
protected FileTailingMessageProducerSupport doGet()
doGet
in class IntegrationComponentSpec<TailAdapterSpec,FileTailingMessageProducerSupport>