The Parser FC wraps a Parser into an AssemblyLine Component, such that it can be inserted anywhere in the AssemblyLine data flow.
Multiple instances of Parser FCs could aid in decoding two or more layers of protocol.
A Parser Function Component also has a Parser tab. Using the Parser tab, we can select and configure the Parser we want to use to interpret or generate data stream records.
This FC allows us to select a Parser and then set its mode to either input (Read) or output (Write).
In Read mode, provide an attribute (in
the Output Map) called "value" which is either a string, a File, a Reader or a java.io.InputStream object to be used as input
for the Parser. The FC will return an Entry object (conn)
with the parsed attributes, which are then available for your Input
Map.
In Write mode the FC takes an Entry with the
attributes passed in by the Output Map and applies the Parser to that
Entry, providing the return bytestream in the Attribute named "value".
This Attribute is a java.lang.String if we select the Return
result as String checkbox in the Config tab; otherwise it is
a bytearray.