Interface StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder
- All Superinterfaces:
org.apache.camel.builder.EndpointConsumerBuilder
,org.apache.camel.EndpointConsumerResolver
- All Known Subinterfaces:
StreamEndpointBuilderFactory.StreamEndpointBuilder
- Enclosing interface:
StreamEndpointBuilderFactory
public static interface StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder
extends org.apache.camel.builder.EndpointConsumerBuilder
Builder for endpoint consumers for the Stream component.
-
Method Summary
Modifier and TypeMethodDescriptionadvanced()
You can configure the encoding (is a charset name) to use text-based streams (for example, message body is a String object).When using the stream:file URI format, this option specifies the filename to stream to/from.fileWatcher
(boolean fileWatcher) To use JVM file watcher to listen for file change events to support re-loading files that may be overwritten, somewhat like tail --retry.fileWatcher
(String fileWatcher) To use JVM file watcher to listen for file change events to support re-loading files that may be overwritten, somewhat like tail --retry.groupLines
(int groupLines) To group X number of lines in the consumer.groupLines
(String groupLines) To group X number of lines in the consumer.groupStrategy
(String groupStrategy) Allows to use a custom GroupStrategy to control how to group lines.groupStrategy
(org.apache.camel.component.stream.GroupStrategy groupStrategy) Allows to use a custom GroupStrategy to control how to group lines.httpHeaders
(String httpHeaders) When using stream:http format, this option specifies optional http headers, such as Accept: application/json.When using stream:http format, this option specifies the http url to stream from.initialPromptDelay
(long initialPromptDelay) Initial delay in milliseconds before showing the message prompt.initialPromptDelay
(String initialPromptDelay) Initial delay in milliseconds before showing the message prompt.promptDelay
(long promptDelay) Optional delay in milliseconds before showing the message prompt.promptDelay
(String promptDelay) Optional delay in milliseconds before showing the message prompt.promptMessage
(String promptMessage) Message prompt to use when reading from stream:in; for example, you could set this to Enter a command:.readLine
(boolean readLine) Whether to read the input stream in line mode (terminate by line breaks).Whether to read the input stream in line mode (terminate by line breaks).retry
(boolean retry) Will retry opening the stream if it's overwritten, somewhat like tail --retry If reading from files then you should also enable the fileWatcher option, to make it work reliable.Will retry opening the stream if it's overwritten, somewhat like tail --retry If reading from files then you should also enable the fileWatcher option, to make it work reliable.scanStream
(boolean scanStream) To be used for continuously reading a stream such as the unix tail command.scanStream
(String scanStream) To be used for continuously reading a stream such as the unix tail command.scanStreamDelay
(long scanStreamDelay) Delay in milliseconds between read attempts when using scanStream.scanStreamDelay
(String scanStreamDelay) Delay in milliseconds between read attempts when using scanStream.Methods inherited from interface org.apache.camel.builder.EndpointConsumerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUri, getUri
Methods inherited from interface org.apache.camel.EndpointConsumerResolver
resolve, resolve
-
Method Details
-
advanced
-
encoding
You can configure the encoding (is a charset name) to use text-based streams (for example, message body is a String object). If not provided, Camel uses the JVM default Charset. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
encoding
- the value to set- Returns:
- the dsl builder
-
fileName
When using the stream:file URI format, this option specifies the filename to stream to/from. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
fileName
- the value to set- Returns:
- the dsl builder
-
fileWatcher
To use JVM file watcher to listen for file change events to support re-loading files that may be overwritten, somewhat like tail --retry. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
fileWatcher
- the value to set- Returns:
- the dsl builder
-
fileWatcher
To use JVM file watcher to listen for file change events to support re-loading files that may be overwritten, somewhat like tail --retry. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer- Parameters:
fileWatcher
- the value to set- Returns:
- the dsl builder
-
groupLines
To group X number of lines in the consumer. For example to group 10 lines and therefore only spit out an Exchange with 10 lines, instead of 1 Exchange per line. The option is a: <code>int</code> type. Group: consumer- Parameters:
groupLines
- the value to set- Returns:
- the dsl builder
-
groupLines
To group X number of lines in the consumer. For example to group 10 lines and therefore only spit out an Exchange with 10 lines, instead of 1 Exchange per line. The option will be converted to a <code>int</code> type. Group: consumer- Parameters:
groupLines
- the value to set- Returns:
- the dsl builder
-
groupStrategy
default StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder groupStrategy(org.apache.camel.component.stream.GroupStrategy groupStrategy) Allows to use a custom GroupStrategy to control how to group lines. The option is a: <code>org.apache.camel.component.stream.GroupStrategy</code> type. Group: consumer- Parameters:
groupStrategy
- the value to set- Returns:
- the dsl builder
-
groupStrategy
default StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder groupStrategy(String groupStrategy) Allows to use a custom GroupStrategy to control how to group lines. The option will be converted to a <code>org.apache.camel.component.stream.GroupStrategy</code> type. Group: consumer- Parameters:
groupStrategy
- the value to set- Returns:
- the dsl builder
-
httpHeaders
When using stream:http format, this option specifies optional http headers, such as Accept: application/json. Multiple headers can be separated by comma. The format of headers can be either HEADER=VALUE or HEADER:VALUE. In accordance with the HTTP/1.1 specification, leading and/or trailing whitespace is ignored. The option is a: <code>java.lang.String</code> type. Group: consumer- Parameters:
httpHeaders
- the value to set- Returns:
- the dsl builder
-
httpUrl
When using stream:http format, this option specifies the http url to stream from. The option is a: <code>java.lang.String</code> type. Group: consumer- Parameters:
httpUrl
- the value to set- Returns:
- the dsl builder
-
initialPromptDelay
default StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder initialPromptDelay(long initialPromptDelay) Initial delay in milliseconds before showing the message prompt. This delay occurs only once. Can be used during system startup to avoid message prompts being written while other logging is done to the system out. The option is a: <code>long</code> type. Default: 2000 Group: consumer- Parameters:
initialPromptDelay
- the value to set- Returns:
- the dsl builder
-
initialPromptDelay
default StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder initialPromptDelay(String initialPromptDelay) Initial delay in milliseconds before showing the message prompt. This delay occurs only once. Can be used during system startup to avoid message prompts being written while other logging is done to the system out. The option will be converted to a <code>long</code> type. Default: 2000 Group: consumer- Parameters:
initialPromptDelay
- the value to set- Returns:
- the dsl builder
-
promptDelay
Optional delay in milliseconds before showing the message prompt. The option is a: <code>long</code> type. Group: consumer- Parameters:
promptDelay
- the value to set- Returns:
- the dsl builder
-
promptDelay
Optional delay in milliseconds before showing the message prompt. The option will be converted to a <code>long</code> type. Group: consumer- Parameters:
promptDelay
- the value to set- Returns:
- the dsl builder
-
promptMessage
default StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder promptMessage(String promptMessage) Message prompt to use when reading from stream:in; for example, you could set this to Enter a command:. The option is a: <code>java.lang.String</code> type. Group: consumer- Parameters:
promptMessage
- the value to set- Returns:
- the dsl builder
-
readLine
Whether to read the input stream in line mode (terminate by line breaks). Setting this to false, will instead read the entire stream until EOL. The option is a: <code>boolean</code> type. Default: true Group: consumer- Parameters:
readLine
- the value to set- Returns:
- the dsl builder
-
readLine
Whether to read the input stream in line mode (terminate by line breaks). Setting this to false, will instead read the entire stream until EOL. The option will be converted to a <code>boolean</code> type. Default: true Group: consumer- Parameters:
readLine
- the value to set- Returns:
- the dsl builder
-
retry
Will retry opening the stream if it's overwritten, somewhat like tail --retry If reading from files then you should also enable the fileWatcher option, to make it work reliable. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
retry
- the value to set- Returns:
- the dsl builder
-
retry
Will retry opening the stream if it's overwritten, somewhat like tail --retry If reading from files then you should also enable the fileWatcher option, to make it work reliable. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer- Parameters:
retry
- the value to set- Returns:
- the dsl builder
-
scanStream
To be used for continuously reading a stream such as the unix tail command. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
scanStream
- the value to set- Returns:
- the dsl builder
-
scanStream
To be used for continuously reading a stream such as the unix tail command. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer- Parameters:
scanStream
- the value to set- Returns:
- the dsl builder
-
scanStreamDelay
default StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder scanStreamDelay(long scanStreamDelay) Delay in milliseconds between read attempts when using scanStream. The option is a: <code>long</code> type. Group: consumer- Parameters:
scanStreamDelay
- the value to set- Returns:
- the dsl builder
-
scanStreamDelay
default StreamEndpointBuilderFactory.StreamEndpointConsumerBuilder scanStreamDelay(String scanStreamDelay) Delay in milliseconds between read attempts when using scanStream. The option will be converted to a <code>long</code> type. Group: consumer- Parameters:
scanStreamDelay
- the value to set- Returns:
- the dsl builder
-