Module org.refcodes.serial
Package org.refcodes.serial
Class StopAndWaitSectionDecorator.Builder<DECORATEE extends Section>
- java.lang.Object
-
- org.refcodes.serial.StopAndWaitSectionDecorator.Builder<DECORATEE>
-
- Type Parameters:
DECORATEE
- The decoratee type describing the according subclass to be enriched.
- All Implemented Interfaces:
org.refcodes.mixin.ConcatenateModeAccessor.ConcatenateModeBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE,StopAndWaitSectionDecorator.Builder<DECORATEE>>
,org.refcodes.numerical.CrcAlgorithmAccessor.CrcAlgorithmBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,org.refcodes.numerical.CrcChecksumValidationModeAccessor.CrcChecksumValidationModeBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,org.refcodes.numerical.EndianessAccessor.EndianessBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,AcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,AcknowledgeRetryNumberAccessor.AcknowledgeRetryNumberBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,AcknowledgeSegmentPackagerAccessor.AcknowledgeSegmentPackagerBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,AcknowledgeTimeoutInMsAccessor.AcknowledgeTimeoutInMsBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,SequenceNumberInitValueAccessor.SequenceNumberInitValueBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
,SequenceNumberWidthAccessor.SequenceNumberWidthBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
- Enclosing class:
- StopAndWaitSectionDecorator<DECORATEE extends Section>
public static final class StopAndWaitSectionDecorator.Builder<DECORATEE extends Section> extends Object implements AcknowledgeRetryNumberAccessor.AcknowledgeRetryNumberBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, AcknowledgeTimeoutInMsAccessor.AcknowledgeTimeoutInMsBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE,StopAndWaitSectionDecorator.Builder<DECORATEE>>, AcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, SequenceNumberWidthAccessor.SequenceNumberWidthBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, SequenceNumberInitValueAccessor.SequenceNumberInitValueBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, org.refcodes.mixin.ConcatenateModeAccessor.ConcatenateModeBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, org.refcodes.numerical.CrcChecksumValidationModeAccessor.CrcChecksumValidationModeBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, org.refcodes.numerical.CrcAlgorithmAccessor.CrcAlgorithmBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, org.refcodes.numerical.EndianessAccessor.EndianessBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>, AcknowledgeSegmentPackagerAccessor.AcknowledgeSegmentPackagerBuilder<StopAndWaitSectionDecorator.Builder<DECORATEE>>
Builder to buildStopAndWaitSegmentDecorator
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StopAndWaitSectionDecorator<DECORATEE>
build()
Returns theStopAndWaitSegmentDecorator
instance build according to theStopAndWaitSectionDecorator.Builder
configuration.StopAndWaitSectionDecorator.Builder<DECORATEE>
withAcknowledgeMagicBytes(byte[] aAcknowledgeMagicBytes)
Sets the magic bytes for the acknowledge magic bytes property.StopAndWaitSectionDecorator.Builder<DECORATEE>
withAcknowledgeRetryNumber(int aAcknowledgeRetryNumber)
Sets the number of retries for the acknowledge retry number.StopAndWaitSectionDecorator.Builder<DECORATEE>
withAcknowledgeSegmentPackager(SegmentPackager aAcknowledgeSegmentPackager)
Sets theSegmentPackager
ACK property.StopAndWaitSectionDecorator.Builder<DECORATEE>
withAcknowledgeTimeoutInMs(long aAckTimeoutInMs)
Sets the number for the acknowledge timeout property.StopAndWaitSectionDecorator.Builder<DECORATEE>
withConcatenateMode(org.refcodes.mixin.ConcatenateMode aConcatenateMode)
}StopAndWaitSectionDecorator.Builder<DECORATEE>
withCrcAlgorithm(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
StopAndWaitSectionDecorator.Builder<DECORATEE>
withCrcChecksumValidationMode(org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode)
StopAndWaitSectionDecorator.Builder<DECORATEE>
withDecoratee(DECORATEE aDecoratee)
}StopAndWaitSectionDecorator.Builder<DECORATEE>
withEndianess(org.refcodes.numerical.Endianess aEndianess)
StopAndWaitSectionDecorator.Builder<DECORATEE>
withSequenceNumberInitValue(int aSequenceNumberInitValue)
Sets the sequence number initial value for the sequence number initial value property.StopAndWaitSectionDecorator.Builder<DECORATEE>
withSequenceNumberWidth(int aSequenceNumberWidth)
Sets the sequence number width (in bytes) for the sequence number width (in bytes) property.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.serial.AcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesBuilder
withAcknowledgeMagicBytes, withAcknowledgeMagicBytes
-
-
-
-
Method Detail
-
withAcknowledgeRetryNumber
public StopAndWaitSectionDecorator.Builder<DECORATEE> withAcknowledgeRetryNumber(int aAcknowledgeRetryNumber)
Sets the number of retries for the acknowledge retry number. A acknowledge retry number is the overall number of retries to use when counting retries.}- Specified by:
withAcknowledgeRetryNumber
in interfaceAcknowledgeRetryNumberAccessor.AcknowledgeRetryNumberBuilder<DECORATEE extends Section>
- Parameters:
aAcknowledgeRetryNumber
- The number of retries to be stored by the number of acknowledge retry number.- Returns:
- The builder for applying multiple build operations.
-
withAcknowledgeTimeoutInMs
public StopAndWaitSectionDecorator.Builder<DECORATEE> withAcknowledgeTimeoutInMs(long aAckTimeoutInMs)
Sets the number for the acknowledge timeout property.}- Specified by:
withAcknowledgeTimeoutInMs
in interfaceAcknowledgeTimeoutInMsAccessor.AcknowledgeTimeoutInMsBuilder<DECORATEE extends Section>
- Parameters:
aAckTimeoutInMs
- The acknowledge timeout in milliseconds to be stored by the acknowledge timeout property.- Returns:
- The builder for applying multiple build operations.
-
withDecoratee
public StopAndWaitSectionDecorator.Builder<DECORATEE> withDecoratee(DECORATEE aDecoratee)
}- Specified by:
withDecoratee
in interfaceorg.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE extends Section,StopAndWaitSectionDecorator.Builder<DECORATEE extends Section>>
-
withAcknowledgeMagicBytes
public StopAndWaitSectionDecorator.Builder<DECORATEE> withAcknowledgeMagicBytes(byte[] aAcknowledgeMagicBytes)
Sets the magic bytes for the acknowledge magic bytes property.}- Specified by:
withAcknowledgeMagicBytes
in interfaceAcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesBuilder<DECORATEE extends Section>
- Parameters:
aAcknowledgeMagicBytes
- The magic bytes to be stored by the acknowledge magic bytes property.- Returns:
- The builder for applying multiple build operations.
-
withSequenceNumberWidth
public StopAndWaitSectionDecorator.Builder<DECORATEE> withSequenceNumberWidth(int aSequenceNumberWidth)
Sets the sequence number width (in bytes) for the sequence number width (in bytes) property.}- Specified by:
withSequenceNumberWidth
in interfaceSequenceNumberWidthAccessor.SequenceNumberWidthBuilder<DECORATEE extends Section>
- Parameters:
aSequenceNumberWidth
- The sequence number width (in bytes) to be stored by the sequence number width (in bytes) property.- Returns:
- The builder for applying multiple build operations.
-
withSequenceNumberInitValue
public StopAndWaitSectionDecorator.Builder<DECORATEE> withSequenceNumberInitValue(int aSequenceNumberInitValue)
Sets the sequence number initial value for the sequence number initial value property.}- Specified by:
withSequenceNumberInitValue
in interfaceSequenceNumberInitValueAccessor.SequenceNumberInitValueBuilder<DECORATEE extends Section>
- Parameters:
aSequenceNumberInitValue
- The sequence number initial value to be stored by the sequence number initial value property.- Returns:
- The builder for applying multiple build operations.
-
withConcatenateMode
public StopAndWaitSectionDecorator.Builder<DECORATEE> withConcatenateMode(org.refcodes.mixin.ConcatenateMode aConcatenateMode)
}
-
withCrcAlgorithm
public StopAndWaitSectionDecorator.Builder<DECORATEE> withCrcAlgorithm(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
-
withCrcChecksumValidationMode
public StopAndWaitSectionDecorator.Builder<DECORATEE> withCrcChecksumValidationMode(org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode)
-
withEndianess
public StopAndWaitSectionDecorator.Builder<DECORATEE> withEndianess(org.refcodes.numerical.Endianess aEndianess)
-
withAcknowledgeSegmentPackager
public StopAndWaitSectionDecorator.Builder<DECORATEE> withAcknowledgeSegmentPackager(SegmentPackager aAcknowledgeSegmentPackager)
Sets theSegmentPackager
ACK property.- Specified by:
withAcknowledgeSegmentPackager
in interfaceAcknowledgeSegmentPackagerAccessor.AcknowledgeSegmentPackagerBuilder<DECORATEE extends Section>
- Parameters:
aAcknowledgeSegmentPackager
- TheSegmentPackager
to be stored by theSegmentPackager
ACK property.- Returns:
- The builder for applying multiple build operations.
-
build
public StopAndWaitSectionDecorator<DECORATEE> build()
Returns theStopAndWaitSegmentDecorator
instance build according to theStopAndWaitSectionDecorator.Builder
configuration.- Returns:
- The accordingly configured
StopAndWaitSegmentDecorator
.
-
-