public class TailAdapterSpec extends MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
MessageProducerSpec
for file tailing adapters.PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
TailAdapterSpec() |
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(MessageChannel errorChannel)
Configure the
MessageChannel to which error messages will be sent. |
protected TailAdapterSpec |
file(File file) |
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(String id)
Configure the component identifier.
|
TailAdapterSpec |
idleEventInterval(long idleEventInterval)
Specify the idle interval before start sending idle events.
|
TailAdapterSpec |
nativeOptions(String nativeOptions)
Specify the options string for native
tail command. |
TailAdapterSpec |
outputChannel(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(TaskExecutor taskExecutor)
Configure a task executor.
|
TailAdapterSpec |
taskScheduler(TaskScheduler taskScheduler)
Set a task scheduler - defaults to the integration 'taskScheduler'.
|
errorChannel, errorMessageStrategy, outputChannel, sendTimeout, shouldTrack
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
protected TailAdapterSpec file(File file)
public TailAdapterSpec nativeOptions(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(TaskExecutor taskExecutor)
SimpleAsyncTaskExecutor
.taskExecutor
- the taskExecutor.public TailAdapterSpec taskScheduler(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(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(MessageChannel outputChannel)
MessageProducerSpec
outputChannel
for the
MessageProducer
outputChannel
in class MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
outputChannel
- the outputChannel.MessageProducerSupport.setOutputChannel(MessageChannel)
public TailAdapterSpec errorChannel(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>