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:
- DisposableBean,- FactoryBean<FileTailingMessageProducerSupport>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle
public class TailAdapterSpec
extends MessageProducerSpec<TailAdapterSpec,FileTailingMessageProducerSupport> 
A 
MessageProducerSpec for file tailing adapters.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
- 
Field SummaryFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionautoStartup(boolean autoStartup) delay(long delay) The delay between checks of the file for new content in milliseconds.protected FileTailingMessageProducerSupportdoGet()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) Configure the bean name of theMessageChannelto which error messages will be sent.errorChannel(MessageChannel errorChannel) Configure theMessageChannelto which error messages will be sent.errorMessageStrategy(ErrorMessageStrategy errorMessageStrategy) Set anErrorMessageStrategyto use to build an error message when a exception occurs.protected TailAdapterSpecfileDelay(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.Configure the component identifier.idleEventInterval(long idleEventInterval) Specify the idle interval before start sending idle events.nativeOptions(String nativeOptions) Specify the options string for nativetailcommand.outputChannel(String outputChannel) Specify the bean name of theoutputChannelfor theMessageProducer.outputChannel(MessageChannel outputChannel) Specify theoutputChannelfor theMessageProducer.phase(int phase) reopen(boolean reopen) Iftrue, close and reopen the file between reading chunks.sendTimeout(long sendTimeout) Configure the default timeout value to use for send operations.shouldTrack(boolean shouldTrack) Whether component should be tracked or not by message history.taskExecutor(TaskExecutor taskExecutor) Configure a task executor.taskScheduler(TaskScheduler taskScheduler) Set a task scheduler - defaults to the integration 'taskScheduler'.Methods inherited from class org.springframework.integration.dsl.MessageProducerSpecobservationConventionMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingleton
- 
Constructor Details- 
TailAdapterSpecprotected TailAdapterSpec()
 
- 
- 
Method Details- 
file
- 
nativeOptionsSpecify the options string for nativetailcommand.- Parameters:
- nativeOptions- the nativeOptions.
- Returns:
- the spec.
- See Also:
 
- 
enableStatusReaderThis field control the stderr events.- Parameters:
- enableStatusReader- boolean to enable or disable events from stderr.
- Returns:
- the spec
 
- 
idleEventIntervalSpecify the idle interval before start sending idle events.- Parameters:
- idleEventInterval- interval in ms for the event idle time.
- Returns:
- the spec.
 
- 
taskExecutorConfigure a task executor. Defaults to aSimpleAsyncTaskExecutor.- Parameters:
- taskExecutor- the taskExecutor.
- Returns:
- the spec.
 
- 
taskSchedulerSet a task scheduler - defaults to the integration 'taskScheduler'.- Parameters:
- taskScheduler- the taskScheduler.
- Returns:
- the spec.
 
- 
delayThe delay between checks of the file for new content in milliseconds.- Parameters:
- delay- the delay.
- Returns:
- the spec.
- See Also:
 
- 
fileDelayThe 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:
 
- 
endIftrue, tail from the end of the file, otherwise include all lines from the beginning. Defaulttrue.- Parameters:
- end- the end.
- Returns:
- the spec.
- See Also:
 
- 
reopenIftrue, close and reopen the file between reading chunks. Defaultfalse.- Parameters:
- reopen- the 'reopen' option.
- Returns:
- the spec.
- See Also:
 
- 
idDescription copied from class:MessageProducerSpecConfigure the component identifier. Used as thebeanNameto register the bean in the application context for this component. Configure the message producer's bean name.- Overrides:
- idin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- id- the id.
- Returns:
- the spec.
 
- 
phase- Overrides:
- phasein class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- phase- the phase.
- Returns:
- the spec.
- See Also:
 
- 
autoStartup- Overrides:
- autoStartupin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- autoStartup- the autoStartup.
- Returns:
- the spec.
- See Also:
 
- 
outputChannelDescription copied from class:MessageProducerSpecSpecify theoutputChannelfor theMessageProducer.- Overrides:
- outputChannelin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- outputChannel- the outputChannel.
- Returns:
- the spec.
- See Also:
 
- 
errorChannelDescription copied from class:MessageProducerSpecConfigure theMessageChannelto which error messages will be sent.- Overrides:
- errorChannelin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- errorChannel- the errorChannel.
- Returns:
- the spec.
- See Also:
 
- 
outputChannelDescription copied from class:MessageProducerSpecSpecify the bean name of theoutputChannelfor theMessageProducer.- Overrides:
- outputChannelin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- outputChannel- the outputChannel bean name.
- Returns:
- the spec.
- See Also:
 
- 
errorChannelDescription copied from class:MessageProducerSpecConfigure the bean name of theMessageChannelto which error messages will be sent.- Overrides:
- errorChannelin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- errorChannel- the errorChannel bean name.
- Returns:
- the spec.
- See Also:
 
- 
sendTimeoutDescription copied from class:MessageProducerSpecConfigure the default timeout value to use for send operations. May be overridden for individual messages.- Overrides:
- sendTimeoutin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- sendTimeout- the send timeout in milliseconds
- Returns:
- the spec.
- See Also:
 
- 
shouldTrackDescription copied from class:MessageProducerSpecWhether component should be tracked or not by message history.- Overrides:
- shouldTrackin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- shouldTrack- the tracking flag
- Returns:
- the spec.
- See Also:
 
- 
errorMessageStrategyDescription copied from class:MessageProducerSpecSet anErrorMessageStrategyto use to build an error message when a exception occurs.- Overrides:
- errorMessageStrategyin class- MessageProducerSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
- Parameters:
- errorMessageStrategy- the- ErrorMessageStrategy.
- Returns:
- the spec.
- See Also:
 
- 
doGet- Overrides:
- doGetin class- IntegrationComponentSpec<TailAdapterSpec,- FileTailingMessageProducerSupport> 
 
 
-