- All Known Subinterfaces:
Port<PM>,SegmentReceiver,SegmentTransceiver,SerialReceiver,SerialTransceiver
- All Known Implementing Classes:
AbstractPort,AbstractPortDecorator,CrossoverLoopbackPort,LoopbackPort
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
SegmentDestination is used to receive Segment instances
in a unified way.-
Method Summary
Modifier and TypeMethodDescription<SEGMENT extends Segment>
voidreceiveSegment(SEGMENT aSegment) Receives aSegment(and blocks this thread) till all it'sSequencedata has been received and updates theSegmentby invokingSegment.fromTransmission(Sequence).
-
Method Details
-
receiveSegment
Receives aSegment(and blocks this thread) till all it'sSequencedata has been received and updates theSegmentby invokingSegment.fromTransmission(Sequence). This method blocks till all bytes are read.- Type Parameters:
SEGMENT- TheSegmenttype describing theSegmentsubclass of implementingSegmenttypes.- Parameters:
aSegment- TheSegmentto be (re-)initialized with the received data.- Throws:
TransmissionException- Thrown in case the received data cannot be used to (re-)initialize the givenSegment.IOException- thrown in case of I/O issues (e.g. a timeout) while receiving.
-