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
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
-
Method Summary
Modifier and TypeMethodDescriptiondefault DATA[]
receive
(int aMaxSize) Similar toDatagramsDestination.receiveAll()
though at maximum the amount of data as provided returned.default DATA[]
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.Closable.CloseAutomaton
isClosable
Methods inherited from interface org.refcodes.component.ClosedAccessor
isClosed
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
Methods inherited from interface org.refcodes.io.DatagramsDestination
receive, receive
-
Method Details
-
receiveAll
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
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.
-