Class TailAdapterSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,P>
org.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
org.springframework.integration.file.dsl.TailAdapterSpec
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<FileTailingMessageProducerSupport>
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
public class TailAdapterSpec
extends org.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport>
A
MessageProducerSpec
for file tailing adapters.- Since:
- 5.0
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoStartup
(boolean autoStartup) delay
(long delay) The delay between checks of the file for new content in milliseconds.protected FileTailingMessageProducerSupport
doGet()
enableStatusReader
(boolean enableStatusReader) This field control the stderr events.end
(boolean end) Iftrue
, tail from the end of the file, otherwise include all lines from the beginning.errorChannel
(String errorChannel) errorChannel
(org.springframework.messaging.MessageChannel errorChannel) errorMessageStrategy
(org.springframework.integration.support.ErrorMessageStrategy errorMessageStrategy) protected 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.idleEventInterval
(long idleEventInterval) Specify the idle interval before start sending idle events.nativeOptions
(String nativeOptions) Specify the options string for nativetail
command.outputChannel
(String outputChannel) outputChannel
(org.springframework.messaging.MessageChannel outputChannel) phase
(int phase) reopen
(boolean reopen) Iftrue
, close and reopen the file between reading chunks.sendTimeout
(long sendTimeout) shouldTrack
(boolean shouldTrack) taskExecutor
(org.springframework.core.task.TaskExecutor taskExecutor) Configure a task executor.taskScheduler
(org.springframework.scheduling.TaskScheduler taskScheduler) Set a task scheduler - defaults to the integration 'taskScheduler'.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, get, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
TailAdapterSpec
protected TailAdapterSpec()
-
-
Method Details
-
file
-
nativeOptions
Specify the options string for nativetail
command.- Parameters:
nativeOptions
- the nativeOptions.- Returns:
- the spec.
- See Also:
-
enableStatusReader
This field control the stderr events.- Parameters:
enableStatusReader
- boolean to enable or disable events from stderr.- Returns:
- the spec
-
idleEventInterval
Specify the idle interval before start sending idle events.- Parameters:
idleEventInterval
- interval in ms for the event idle time.- Returns:
- the spec.
-
taskExecutor
Configure a task executor. Defaults to aSimpleAsyncTaskExecutor
.- Parameters:
taskExecutor
- the taskExecutor.- Returns:
- the spec.
-
taskScheduler
Set a task scheduler - defaults to the integration 'taskScheduler'.- Parameters:
taskScheduler
- the taskScheduler.- Returns:
- the spec.
-
delay
The delay between checks of the file for new content in milliseconds.- Parameters:
delay
- the delay.- Returns:
- the spec.
- See Also:
-
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.- Parameters:
fileDelay
- the fileDelay.- Returns:
- the spec.
- See Also:
-
end
Iftrue
, tail from the end of the file, otherwise include all lines from the beginning. Defaulttrue
.- Parameters:
end
- the end.- Returns:
- the spec.
- See Also:
-
reopen
Iftrue
, close and reopen the file between reading chunks. Defaultfalse
.- Parameters:
reopen
- the 'reopen' option.- Returns:
- the spec.
- See Also:
-
id
- Overrides:
id
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
phase
- Overrides:
phase
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
autoStartup
- Overrides:
autoStartup
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
outputChannel
- Overrides:
outputChannel
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
errorChannel
- Overrides:
errorChannel
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
outputChannel
- Overrides:
outputChannel
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
errorChannel
- Overrides:
errorChannel
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
sendTimeout
- Overrides:
sendTimeout
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
shouldTrack
- Overrides:
shouldTrack
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
errorMessageStrategy
public TailAdapterSpec errorMessageStrategy(org.springframework.integration.support.ErrorMessageStrategy errorMessageStrategy) - Overrides:
errorMessageStrategy
in classorg.springframework.integration.dsl.MessageProducerSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-
doGet
- Overrides:
doGet
in classorg.springframework.integration.dsl.IntegrationComponentSpec<TailAdapterSpec,
FileTailingMessageProducerSupport>
-