DATA
- The type of the datagram to be operated with. In case you wish
to use array types, you might better use the DatagramsReceiver
type.BidirectionalConnectionTransceiver<DATA,INPUT,OUTPUT>
, BidirectionalStreamConnectionTransceiver<DATA>
, ConnectionDatagramsReceiver<DATA,CON>
, ConnectionDatagramsTransceiver<DATA,CON>
, DatagramReceiver<DATA>
, DatagramsDestination<DATA>
, DatagramsReceiver<DATA>
, DatagramsTransceiver<DATA>
, DatagramTransceiver<DATA>
, InputStreamConnectionReceiver<DATA>
AbstractDatagramsReceiver
, AbstractInputStreamReceiver
, AbstractPrefetchInputStreamReceiver
, BidirectionalStreamConnectionTransceiverImpl
, BidirectionalStreamTransceiver
, DatagramsReceiverDecorator
, InputStreamConnectionReceiverImpl
, InputStreamReceiver
, LoopbackDatagramsReceiver
, LoopbackDatagramsTransceiver
, PrefetchBidirectionalStreamConnectionTransceiver
, PrefetchBidirectionalStreamTransceiver
, PrefetchInputStreamConnectionReceiver
, PrefetchInputStreamReceiver
@FunctionalInterface public interface DatagramDestination<DATA extends Serializable>
DatagramDestination
is used to receive datagrams in a unified
way. The receive()
method provides the next available datagram from
the counterpart DatagramSource
; in case there is none available.Modifier and Type | Method | Description |
---|---|---|
DATA |
receive() |
Reads (receives) the next datagram passed from a
DatagramTransmitter counterpart. |
DATA receive() throws IOException
DatagramTransmitter
counterpart. In case none datagram is
available, then this method blocks until one is available. To prevent
blocking, use the DatagramReceiver
extension's
Availability.available()
method to test beforehand whether a
byte is available (in a multi-threaded usage scenario,
Availability.available()
is not a reliable indicator whether
this method will block or not). When a Thread
is waiting for a
datagram to be read and Thread.interrupt()
is being called, then
the operation is aborted and an InterruptedException
is thrown.DatagramTransmitter
counterpart.IOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.Copyright © 2021. All rights reserved.