Interface Transmission.TransmissionMixin

All Superinterfaces:
org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.Schemable<SerialSchema>, Serializable, Transmission
All Known Subinterfaces:
ArraySection<ARRAY>, ArraySegment<SEGMENT>, Section.SectionMixin, Segment.SegmentMixin
All Known Implementing Classes:
AbstractCipherTransmissionDecorator, AbstractCrcTransmissionDecorator, AbstractErrorCorrectionTransmissionDecorator, AbstractInvertibleTransmissionDecorator, AbstractLengthDecoratorSegment, AbstractMagicBytesTransmission, AbstractMagicBytesTransmissionDecorator, AbstractPayloadSection, AbstractPayloadSegment, AbstractReadyToReceiveTransmissionDecorator, AbstractReadyToSendTransmissionDecorator, AbstractReferenceeLengthSegment, AbstractSectionDecorator, AbstractSegmentDecorator, AbstractStopAndWaitPacketStreamTransmissionDecorator, AbstractStopAndWaitTransmissionDecorator, AbstractTransmissionDecorator, AllocSectionDecoratorSegment, AllocSegmentBody, AllocSegmentHead, AsciizArraySegment, AsciizSegment, AssertMagicBytesSectionDecorator, AssertMagicBytesSegment, AssertMagicBytesSegmentDecorator, BooleanArraySection, BooleanSegment, BreakerSectionDecorator, BreakerSegmentDecorator, ByteArraySection, ByteSegment, CharArraySection, CharSection, CipherSectionDecorator, CipherSegmentDecorator, ComplexTypeSegment, CrcSectionDecorator, CrcSegmentDecorator, DoubleArraySection, DoubleSegment, DynamicTypeSection, EnumSegment, FileSection, FixedLengthSequenceSegment, FixedSegmentArraySection, FloatArraySection, FloatSegment, IntArraySection, IntSegment, InvertibleSectionDecorator, InvertibleSegmentDecorator, LengthSegment, LengthSegmentDecoratorSegment, LongArraySection, LongSegment, MagicBytesSectionDecorator, MagicBytesSegment, MagicBytesSegmentDecorator, NumberSegment, PropertiesSection, ReadyToReceiveSectionDecorator, ReadyToReceiveSegmentDecorator, ReadyToSendSectionDecorator, ReadyToSendSegmentDecorator, SectionComposite, SegmentArraySection, SegmentComposite, SequenceNumberSegment, SequenceSection, ShortArraySection, ShortSegment, StopAndWaitPacketStreamSectionDecorator, StopAndWaitPacketStreamSegmentDecorator, StopAndWaitSectionDecorator, StopAndWaitSegmentDecorator, StringArraySection, StringSection
Enclosing interface:
Transmission

public static interface Transmission.TransmissionMixin extends Transmission
Default implementation of the Transmission interface providing an implementation of the transmitTo(OutputStream, InputStream) method using the Transmission.toSequence() method.
  • Method Details

    • transmitTo

      default void transmitTo(OutputStream aOutputStream, InputStream aReturnStream) throws IOException
      Default implementation harnessing the Transmission.toSequence() method. Transmits the Sequence representing the implementing type's instance to the given OutputStream. Implementations providing error correction methods use the provided feedback InputStream to do some sort of "stop-and-wait ARQ" or apply similar methods to ensure correctness of the transmitted data.
      Specified by:
      transmitTo in interface Transmission
      Parameters:
      aOutputStream - The OutputStream where to write this instance's Sequence to.
      aReturnStream - An InputStream 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 writing data to the OutputStream caused problems.