DATA - the generic typeBlockProvider<DATA>, DatagramProvider<DATA>BidirectionalConnectionTransceiver<DATA,INPUT,OUTPUT>, BidirectionalStreamConnectionTransceiver<DATA>, ConnectionReceiver<DATA,CON>, ConnectionTransceiver<DATA,CON>, InputStreamConnectionReceiver<DATA>, LoopbackReceiver<DATA>, LoopbackTransceiver<DATA>, Receiver<DATA>, Transceiver<DATA>AbstractInputStreamReceiver, AbstractPrefetchInputStreamReceiver, AbstractReceiver, BidirectionalStreamConnectionTransceiverImpl, BidirectionalStreamTransceiverImpl, InputStreamConnectionReceiverImpl, InputStreamReceiverImpl, LoopbackReceiverImpl, LoopbackTransceiverImpl, PrefetchBidirectionalStreamConnectionTransceiverImpl, PrefetchBidirectionalStreamTransceiverImpl, PrefetchInputStreamConnectionReceiverImpl, PrefetchInputStreamReceiverImpl, ReceiverDecorator@FunctionalInterface public interface Provider<DATA extends Serializable> extends DatagramProvider<DATA>, BlockProvider<DATA>
| Modifier and Type | Method | Description |
|---|---|---|
default DATA[] |
readDatagrams() |
Caution: Reads till an
OpenException (or an
InterruptedException in case of blocking till more data is
available) occurs. |
default DATA[] |
readDatagrams(int aBlockSize) |
Similar to
BlockProvider.readDatagrams() though at maximum the amount of data
as provided by the block-size is returned. |
readDatagramdefault DATA[] readDatagrams() throws org.refcodes.component.OpenException, InterruptedException
OpenException (or an
InterruptedException in case of blocking till more data is
available) occurs.
Reads (receives) the next datagram block passed from a
BlockSender or DatagramSender counterpart. In case none
datagram block is available, then this method blocks until one is
available.
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.readDatagrams in interface BlockProvider<DATA extends Serializable>BlockSender or
DatagramReceiver counterpart.org.refcodes.component.OpenException - Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.InterruptedException - Thrown when a Thread is waiting,
sleeping, or otherwise occupied, and the Thread is
interrupted, either before or during the activity.default DATA[] readDatagrams(int aBlockSize) throws org.refcodes.component.OpenException, InterruptedException
BlockProviderBlockProvider.readDatagrams() though at maximum the amount of data
as provided by the block-size is returned.readDatagrams in interface BlockProvider<DATA extends Serializable>aBlockSize - The block-size which is not to exceeded by the returned
data. A value of -1 specifies to retrieve all available datagrams
(same behavior as method BlockProvider.readDatagrams().BlockSender or
DatagramReceiver counterpart.org.refcodes.component.OpenException - Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.InterruptedException - Thrown when a Thread is waiting,
sleeping, or otherwise occupied, and the Thread is
interrupted, either before or during the activity.Copyright © 2018. All rights reserved.