Module org.refcodes.io
Package org.refcodes.io
Interface DatagramsReceiver<DATA extends Serializable>
-
- Type Parameters:
DATA
- the generic type
- All Superinterfaces:
Availability
,org.refcodes.component.Closable
,org.refcodes.component.Closable.CloseAutomaton
,org.refcodes.component.ClosedAccessor
,org.refcodes.component.ConnectableComponent
,org.refcodes.component.ConnectableComponent.ConnectableAutomaton
,org.refcodes.component.ConnectionStatusAccessor
,DatagramDestination<DATA>
,DatagramReceiver<DATA>
,DatagramsDestination<DATA>
,org.refcodes.component.OpenedAccessor
,Receivable
- All Known Subinterfaces:
BidirectionalConnectionTransceiver<DATA,INPUT,OUTPUT>
,BidirectionalStreamConnectionTransceiver<DATA>
,ConnectionDatagramsReceiver<DATA,CON>
,ConnectionDatagramsTransceiver<DATA,CON>
,DatagramsTransceiver<DATA>
,InputStreamConnectionReceiver<DATA>
- All Known Implementing Classes:
AbstractDatagramsReceiver
,AbstractInputStreamReceiver
,AbstractPrefetchInputStreamReceiver
,BidirectionalStreamConnectionTransceiverImpl
,BidirectionalStreamTransceiver
,DatagramsReceiverDecorator
,InputStreamConnectionReceiverImpl
,InputStreamReceiver
,LoopbackDatagramsReceiver
,LoopbackDatagramsTransceiver
,PrefetchBidirectionalStreamConnectionTransceiver
,PrefetchBidirectionalStreamTransceiver
,PrefetchInputStreamConnectionReceiver
,PrefetchInputStreamReceiver
public interface DatagramsReceiver<DATA extends Serializable> extends DatagramReceiver<DATA>, DatagramsDestination<DATA>
The Interface DatagramsReceiver.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ClosedAccessor
org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedProperty
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomaton
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default DATA[]
receive(int aMaxSize)
Similar toDatagramsDestination.receiveAll()
though at maximum the amount of data as provided returned.default DATA[]
receiveAll()
Reads (receives) the all currently available data.-
Methods inherited from interface org.refcodes.io.Availability
available, hasAvailable
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
-
Methods inherited from interface org.refcodes.io.DatagramsDestination
receive, receive
-
-
-
-
Method Detail
-
receiveAll
default DATA[] receiveAll() throws IOException, EOFException
Reads (receives) the all currently available data.- Specified by:
receiveAll
in interfaceDatagramsDestination<DATA extends Serializable>
- Returns:
- The next short block sent from the
DatagramsTransmitter
orDatagramReceiver
counterpart. - Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.EOFException
- Signals that an end of file or end of stream has been reached unexpectedly during input.
-
receive
default DATA[] receive(int aMaxSize) throws IOException, EOFException
Similar toDatagramsDestination.receiveAll()
though at maximum the amount of data as provided returned.- Specified by:
receive
in interfaceDatagramsDestination<DATA extends Serializable>
- Parameters:
aMaxSize
- the a block size- Returns:
- The next short block sent from the
DatagramsTransmitter
orDatagramReceiver
counterpart. - Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.EOFException
- Signals that an end of file or end of stream has been reached unexpectedly during input.
-
-