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.DatagramSource<DATA>
BidirectionalConnectionTransceiver<DATA,INPUT,OUTPUT>
, BidirectionalStreamConnectionTransceiver<DATA>
, ConnectionDatagramsTransceiver<DATA,CON>
, ConnectionDatagramsTransmitter<DATA,CON>
, DatagramsTransceiver<DATA>
, DatagramsTransmitter<DATA>
AbstractDatagramsTransmitter
, BidirectionalStreamConnectionTransceiverImpl
, BidirectionalStreamTransceiver
, LoopbackDatagramsTransceiver
, LoopbackDatagramsTransmitter
, OutputStreamConnectionDatagramsTransmitter
, OutputStreamDatagramsTransmitter
, PrefetchBidirectionalStreamConnectionTransceiver
, PrefetchBidirectionalStreamTransceiver
, TransmitterDecorator
@FunctionalInterface public interface DatagramsSource<DATA extends Serializable> extends DatagramSource<DATA>
DatagramsSource
is used to send datagram blocks (arrays) in a
unified way.Modifier and Type | Method | Description |
---|---|---|
default void |
transmit(DATA aDatagram) |
Writes (sends) a datagram to a listening
DatagramReceiver . |
void |
transmit(DATA[] aDatagram,
int aOffset,
int aLength) |
Write datagrams.
|
default void |
transmitAll(DATA[] aDatagram) |
Writes (sends) a datagram block to a listening
DatagramReceiver
or DatagramsReceiver . |
default void transmit(DATA aDatagram) throws IOException
DatagramReceiver
.transmit
in interface DatagramSource<DATA extends Serializable>
aDatagram
- The datagram to be pushed to the receiving
DatagramSource
.IOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.default void transmitAll(DATA[] aDatagram) throws IOException
DatagramReceiver
or DatagramsReceiver
.aDatagram
- The datagram to be pushed to the receiving
DatagramReceiver
or DatagramsReceiver
.IOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.void transmit(DATA[] aDatagram, int aOffset, int aLength) throws IOException
aDatagram
- the datagramaOffset
- the offsetaLength
- the lengthIOException
- the open exceptionCopyright © 2021. All rights reserved.