Class GrokDataFormat.Builder
- java.lang.Object
-
- org.apache.camel.model.dataformat.GrokDataFormat.Builder
-
- All Implemented Interfaces:
DataFormatBuilder<GrokDataFormat>
- Enclosing class:
- GrokDataFormat
public static class GrokDataFormat.Builder extends Object implements DataFormatBuilder<GrokDataFormat>
Builder
is a specific builder forGrokDataFormat
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GrokDataFormat.Builder
allowMultipleMatchesPerLine(boolean allowMultipleMatchesPerLine)
If false, every line of input is matched for pattern only once.GrokDataFormat.Builder
allowMultipleMatchesPerLine(String allowMultipleMatchesPerLine)
If false, every line of input is matched for pattern only once.GrokDataFormat
end()
Ends the build of the data format.GrokDataFormat.Builder
flattened(boolean flattened)
Turns on flattened mode.GrokDataFormat.Builder
flattened(String flattened)
Turns on flattened mode.GrokDataFormat.Builder
namedOnly(boolean namedOnly)
Whether to capture named expressions only or not (i.e.GrokDataFormat.Builder
namedOnly(String namedOnly)
Whether to capture named expressions only or not (i.e.GrokDataFormat.Builder
pattern(String pattern)
The grok pattern to match lines of input
-
-
-
Method Detail
-
pattern
public GrokDataFormat.Builder pattern(String pattern)
The grok pattern to match lines of input
-
flattened
public GrokDataFormat.Builder flattened(String flattened)
Turns on flattened mode. In flattened mode the exception is thrown when there are multiple pattern matches with same key.
-
flattened
public GrokDataFormat.Builder flattened(boolean flattened)
Turns on flattened mode. In flattened mode the exception is thrown when there are multiple pattern matches with same key.
-
allowMultipleMatchesPerLine
public GrokDataFormat.Builder allowMultipleMatchesPerLine(String allowMultipleMatchesPerLine)
If false, every line of input is matched for pattern only once. Otherwise the line can be scanned multiple times when non-terminal pattern is used.
-
allowMultipleMatchesPerLine
public GrokDataFormat.Builder allowMultipleMatchesPerLine(boolean allowMultipleMatchesPerLine)
If false, every line of input is matched for pattern only once. Otherwise the line can be scanned multiple times when non-terminal pattern is used.
-
namedOnly
public GrokDataFormat.Builder namedOnly(String namedOnly)
Whether to capture named expressions only or not (i.e. %{IP:ip} but not ${IP})
-
namedOnly
public GrokDataFormat.Builder namedOnly(boolean namedOnly)
Whether to capture named expressions only or not (i.e. %{IP:ip} but not ${IP})
-
end
public GrokDataFormat end()
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Specified by:
end
in interfaceDataFormatBuilder<GrokDataFormat>
- Returns:
- the data format fully built.
-
-