Module org.refcodes.serial
Package org.refcodes.serial
Class ReadyToSendSectionDecorator<DECORATEE extends Section>
java.lang.Object
org.refcodes.serial.AbstractReadyToSendTransmissionDecorator<DECORATEE>
org.refcodes.serial.ReadyToSendSectionDecorator<DECORATEE>
- Type Parameters:
DECORATEE
- The decoratee type describing the according subclass to be enriched.
- All Implemented Interfaces:
Serializable
,org.refcodes.mixin.DecorateeAccessor<DECORATEE>
,org.refcodes.mixin.LengthAccessor
,org.refcodes.mixin.Schemable
,ClearToSendMagicBytesAccessor
,ClearToSendSegmentPackagerAccessor
,ClearToSendTimeoutMillisAccessor
,DecoratorSection<DECORATEE>
,EnquiryStandbyTimeMillisAccessor
,ReadyToSendMagicBytesAccessor
,ReadyToSendRetryNumberAccessor
,ReadyToSendSegmentPackagerAccessor
,ReadyToSendTimeoutMillisAccessor
,ReadyToSendTransmission
,Section
,Transmission
,Transmission.TransmissionMixin
public class ReadyToSendSectionDecorator<DECORATEE extends Section>
extends AbstractReadyToSendTransmissionDecorator<DECORATEE>
implements Section, DecoratorSection<DECORATEE>
The
ReadyToSendSectionDecorator
class implements a decorator
providing ReadyToSendTransmission
functionality for a
Segment
.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder to buildReadyToSendSectionDecorator
instances.Nested classes/interfaces inherited from interface org.refcodes.serial.ClearToSendMagicBytesAccessor
ClearToSendMagicBytesAccessor.ClearToSendMagicBytesBuilder<B extends ClearToSendMagicBytesAccessor.ClearToSendMagicBytesBuilder<B>>, ClearToSendMagicBytesAccessor.ClearToSendMagicBytesMutator, ClearToSendMagicBytesAccessor.ClearToSendMagicBytesProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.ClearToSendSegmentPackagerAccessor
ClearToSendSegmentPackagerAccessor.ClearToSendSegmentPackagerBuilder<B extends ClearToSendSegmentPackagerAccessor.ClearToSendSegmentPackagerBuilder<B>>, ClearToSendSegmentPackagerAccessor.ClearToSendSegmentPackagerMutator, ClearToSendSegmentPackagerAccessor.ClearToSendSegmentPackagerProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.ClearToSendTimeoutMillisAccessor
ClearToSendTimeoutMillisAccessor.ClearToSendTimeoutMillisBuilder<B extends ClearToSendTimeoutMillisAccessor.ClearToSendTimeoutMillisBuilder<B>>, ClearToSendTimeoutMillisAccessor.ClearToSendTimeoutMillisMutator, ClearToSendTimeoutMillisAccessor.ClearToSendTimeoutMillisProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.DecorateeAccessor
org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE extends Object,
B extends org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE, B>>, org.refcodes.mixin.DecorateeAccessor.DecorateeMutator<DECORATEE extends Object>, org.refcodes.mixin.DecorateeAccessor.DecorateeProperty<DECORATEE extends Object> Nested classes/interfaces inherited from interface org.refcodes.serial.EnquiryStandbyTimeMillisAccessor
EnquiryStandbyTimeMillisAccessor.EnquiryStandbyTimeMillisBuilder<B extends EnquiryStandbyTimeMillisAccessor.EnquiryStandbyTimeMillisBuilder<B>>, EnquiryStandbyTimeMillisAccessor.EnquiryStandbyTimeMillisMutator, EnquiryStandbyTimeMillisAccessor.EnquiryStandbyTimeMillisProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.LengthAccessor
org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.ReadyToSendMagicBytesAccessor
ReadyToSendMagicBytesAccessor.ReadyToSendMagicBytesBuilder<B extends ReadyToSendMagicBytesAccessor.ReadyToSendMagicBytesBuilder<B>>, ReadyToSendMagicBytesAccessor.ReadyToSendMagicBytesMutator, ReadyToSendMagicBytesAccessor.ReadyToSendMagicBytesProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.ReadyToSendRetryNumberAccessor
ReadyToSendRetryNumberAccessor.ReadyToSendRetryNumberBuilder<B extends ReadyToSendRetryNumberAccessor.ReadyToSendRetryNumberBuilder<B>>, ReadyToSendRetryNumberAccessor.ReadyToSendRetryNumberMutator, ReadyToSendRetryNumberAccessor.ReadyToSendRetryNumberProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.ReadyToSendSegmentPackagerAccessor
ReadyToSendSegmentPackagerAccessor.ReadyToSendSegmentPackagerBuilder<B extends ReadyToSendSegmentPackagerAccessor.ReadyToSendSegmentPackagerBuilder<B>>, ReadyToSendSegmentPackagerAccessor.ReadyToSendSegmentPackagerMutator, ReadyToSendSegmentPackagerAccessor.ReadyToSendSegmentPackagerProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.ReadyToSendTimeoutMillisAccessor
ReadyToSendTimeoutMillisAccessor.ReadyToSendTimeoutMillisBuilder<B extends ReadyToSendTimeoutMillisAccessor.ReadyToSendTimeoutMillisBuilder<B>>, ReadyToSendTimeoutMillisAccessor.ReadyToSendTimeoutMillisMutator, ReadyToSendTimeoutMillisAccessor.ReadyToSendTimeoutMillisProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.Section
Section.SectionMixin
Nested classes/interfaces inherited from interface org.refcodes.serial.Transmission
Transmission.TransmissionMixin
-
Field Summary
Fields inherited from class org.refcodes.serial.AbstractReadyToSendTransmissionDecorator
_clearToSendMagicBytes, _clearToSendMagicBytesSegment, _clearToSendSegment, _clearToSendSegmentPackager, _clearToSendTimeoutInMs, _decoratee, _enquiryStandbyTimeInMs, _readyToSendMagicBytes, _readyToSendMagicBytesSegment, _readyToSendRetryNumber, _readyToSendSegment, _readyToSendSegmentPackager, _readyToSendTimeoutInMs, CTS_MAGIC_BYTES, CTS_TIMEOUT_IN_MS, RTS_MAGIC_BYTES, RTS_RETRY_NUMBER, RTS_TIMEOUT_IN_MS
-
Constructor Summary
ConstructorsConstructorDescriptionReadyToSendSectionDecorator
(DECORATEE aDecoratee) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, byte[] aClearToSendMagicBytes) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, byte[] aClearToSendMagicBytes) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, long aClearToSendTimeoutInMs) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, byte[] aClearToSendMagicBytes) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, byte[] aClearToSendMagicBytes) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, long aClearToSendTimeoutInMs) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, long aReadyToSendTimeoutInMs, long aClearToSendTimeoutInMs) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) ReadyToSendSectionDecorator
(DECORATEE aDecoratee, TransmissionMetrics aTransmissionMetrics) -
Method Summary
Modifier and TypeMethodDescriptionstatic <DECORATEE extends Section>
ReadyToSendSectionDecorator.Builder<DECORATEE>builder()
Creates builder to buildReadyToSendSectionDecorator
.void
fromTransmission
(Sequence aSequence, int aOffset, int aLength) (Re-)initializes this instance with the the givenSequence
data.void
receiveFrom
(InputStream aInputStream, int aLength, OutputStream aReturnStream) (Re-)initializes this instance by receiving the accordingSequence
from the givenInputStream
.Methods inherited from class org.refcodes.serial.AbstractReadyToSendTransmissionDecorator
equals, getClearToSendMagicBytes, getClearToSendSegmentPackager, getClearToSendTimeoutMillis, getDecoratee, getEnquiryStandbyTimeMillis, getLength, getReadyToSendMagicBytes, getReadyToSendRetryNumber, getReadyToSendSegmentPackager, getReadyToSendTimeoutMillis, hashCode, receiveCtsTransmitTo, toSchema, toSequence, toSimpleTypeMap, toString, transmitTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.DecorateeAccessor
getDecoratee
Methods inherited from interface org.refcodes.serial.Section
fromTransmission, fromTransmission, fromTransmission, receiveFrom, receiveFrom
Methods inherited from interface org.refcodes.serial.Transmission
getLength, toSchema, toSequence, toSimpleTypeMap, transmitTo, transmitTo
-
Constructor Details
-
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator() -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, byte[] aClearToSendMagicBytes) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, byte[] aClearToSendMagicBytes) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, byte[] aReadyToSendMagicBytes, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, long aClearToSendTimeoutInMs) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, byte[] aClearToSendMagicBytes) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, byte[] aClearToSendMagicBytes) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, int aReadyToSendRetryNumber, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, byte[] aReadyToSendMagicBytes, SegmentPackager aReadyToSendSegmentPackager, byte[] aClearToSendMagicBytes, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, long aClearToSendTimeoutInMs) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, int aReadyToSendRetryNumber, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, long aReadyToSendTimeoutInMs, long aClearToSendTimeoutInMs) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aEnquiryStandbyTimeInMs, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
public ReadyToSendSectionDecorator(DECORATEE aDecoratee, long aReadyToSendTimeoutInMs, SegmentPackager aReadyToSendSegmentPackager, long aClearToSendTimeoutInMs, SegmentPackager aClearToSendSegmentPackager) -
ReadyToSendSectionDecorator
-
ReadyToSendSectionDecorator
-
ReadyToSendSectionDecorator
-
-
Method Details
-
fromTransmission
public void fromTransmission(Sequence aSequence, int aOffset, int aLength) throws TransmissionException (Re-)initializes this instance with the the givenSequence
data.- Specified by:
fromTransmission
in interfaceSection
- Parameters:
aSequence
- TheSequence
data from which to (re-)initialize this instance.aOffset
- The offset where to start processing the providedSequence
.aLength
- The length of data assigned by theSequence
.- Throws:
TransmissionException
- thrown in case a givenSequence
cannot be processed.
-
receiveFrom
public void receiveFrom(InputStream aInputStream, int aLength, OutputStream aReturnStream) throws IOException (Re-)initializes this instance by receiving the accordingSequence
from the givenInputStream
. Implementations providing error correction methods use the provided feedbackOutputStream
to do some sort of "stop-and-wait ARQ" or apply similar methods to ensure correctness of the received data.- Specified by:
receiveFrom
in interfaceSection
- Parameters:
aInputStream
- TheInputStream
from which to read the instance's (re-)initializationSequence
from.aLength
- The length of data assigned by the byte array.aReturnStream
- AnOutputStream
being the return channel to handle "stop-and-wait ARQ" or the like in case of a bidirectional connection. Can be null in case we have a unidirectional connection.- Throws:
IOException
- thrown in case reading data from theInputStream
caused problems.TransmissionException
- thrown in case a givenInputStream
bytes cannot be processed.
-
builder
Creates builder to buildReadyToSendSectionDecorator
.- Type Parameters:
DECORATEE
- The decoratee type describing the according subclass to be enriched.- Returns:
- created builder
-