- Type Parameters:
DATA
- The type of the datagram block (array) to be operated with. Do not provide an array type as the methods use to generic type for defining an array argument.
- All Superinterfaces:
DatagramSource<DATA>
- All Known Subinterfaces:
BidirectionalConnectionTransceiver<DATA,
,INPUT, OUTPUT> BidirectionalStreamConnectionTransceiver<DATA>
,ConnectionDatagramsTransceiver<DATA,
,CON> ConnectionDatagramsTransmitter<DATA,
,CON> DatagramsTransceiver<DATA>
,DatagramsTransmitter<DATA>
- All Known Implementing Classes:
AbstractDatagramsTransmitter
,BidirectionalStreamConnectionTransceiverImpl
,BidirectionalStreamTransceiver
,LoopbackDatagramsTransceiver
,LoopbackDatagramsTransmitter
,OutputStreamConnectionDatagramsTransmitter
,OutputStreamDatagramsTransmitter
,PrefetchBidirectionalStreamConnectionTransceiver
,PrefetchBidirectionalStreamTransceiver
,TransmitterDecorator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface DatagramsSource<DATA extends Serializable>
extends DatagramSource<DATA>
The
DatagramsSource
is used to send datagram blocks (arrays) in a
unified way.-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Writes (sends) a datagram to a listeningDatagramReceiver
.void
Write datagrams.default void
transmitAll
(DATA[] aDatagram) Writes (sends) a datagram block to a listeningDatagramReceiver
orDatagramsReceiver
.
-
Method Details
-
transmit
Writes (sends) a datagram to a listeningDatagramReceiver
.- Specified by:
transmit
in interfaceDatagramSource<DATA extends Serializable>
- Parameters:
aDatagram
- The datagram to be pushed to the receivingDatagramSource
.- Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
transmitAll
Writes (sends) a datagram block to a listeningDatagramReceiver
orDatagramsReceiver
.- Parameters:
aDatagram
- The datagram to be pushed to the receivingDatagramReceiver
orDatagramsReceiver
.- Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
transmit
Write datagrams.- Parameters:
aDatagram
- the datagramaOffset
- the offsetaLength
- the length- Throws:
IOException
- the open exception
-