Class FrameBuilder
-
- All Implemented Interfaces:
public final class FrameBuilderBuilder class to create instances of the Frame type
- Since:
2.0
-
-
Constructor Summary
Constructors Constructor Description FrameBuilder()
-
Method Summary
Modifier and Type Method Description final FrameBuilderwithParser(DataParser parser)Parser to use for container data. final FrameBuildertimestamp(Instant timestamp)Timestamp specified in the frame as the creation time. final FrameBuilderaddData(Data toAdd)Adds a single data block final FrameBuilderaddData(Collection<Data> toAdd)Adds all data to the passed toAdd collection. final FrameBuilderaddData(Data toAdd)Adds all data of the passed toAdd parameters. final FrameBuilderenableChecksum()Activates the checksum function (defaul) final FrameBuilderdisableChecksum()Disables the checksum function final FrameBuilderwithChecksumEnabled(Boolean enabled)Activates or deactivates checksum calculation for the frame to build final Framebuild()Creates a new frame based on the previously configured parameters -
-
Method Detail
-
withParser
final FrameBuilder withParser(DataParser parser)
Parser to use for container data. If not set, the DefaultDataParser is used
- Returns:
this reference
- Since:
2.0
-
timestamp
final FrameBuilder timestamp(Instant timestamp)
Timestamp specified in the frame as the creation time.
The call is optional. If the timestamp is null at the time build is called, a new timestamp is generated. See Instant.now
- Returns:
this reference
- Since:
2.0
-
addData
final FrameBuilder addData(Data toAdd)
Adds a single data block
- Parameters:
toAdd- Data block to be added- Returns:
this reference
- Since:
2.0
-
addData
final FrameBuilder addData(Collection<Data> toAdd)
Adds all data to the passed toAdd collection.
- Parameters:
toAdd- Data blocks to be added- Returns:
this reference
- Since:
2.0
-
addData
final FrameBuilder addData(Data toAdd)
Adds all data of the passed toAdd parameters.
- Parameters:
toAdd- Data blocks to be added- Returns:
this reference
- Since:
2.0
-
enableChecksum
final FrameBuilder enableChecksum()
Activates the checksum function (defaul)
- Returns:
this reference
- Since:
2.0
-
disableChecksum
final FrameBuilder disableChecksum()
Disables the checksum function
- Returns:
this reference
- Since:
2.0
-
withChecksumEnabled
final FrameBuilder withChecksumEnabled(Boolean enabled)
Activates or deactivates checksum calculation for the frame to build
- Returns:
this reference
- Since:
2.0
-
build
final Frame build()
Creates a new frame based on the previously configured parameters
- Returns:
RSCP Frame
- Since:
2.0
-
-
-
-