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.@FunctionalInterface public interface BlockConsumer<DATA extends Serializable>
BlockConsumer
is used to send datagram blocks (arrays) in a
unified way.Modifier and Type | Method and Description |
---|---|
default void |
writeDatagrams(DATA[] aDatagram)
Writes (sends) a datagram block to a listening
DatagramReceiver
or BlockReceiver . |
void |
writeDatagrams(DATA[] aDatagram,
int aOffset,
int aLength)
Write datagrams.
|
default void writeDatagrams(DATA[] aDatagram) throws org.refcodes.component.OpenException
DatagramReceiver
or BlockReceiver
.aDatagram
- The datagram to be pushed to the receiving
DatagramReceiver
or BlockReceiver
.org.refcodes.component.OpenException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.void writeDatagrams(DATA[] aDatagram, int aOffset, int aLength) throws org.refcodes.component.OpenException
aDatagram
- the a datagramaOffset
- the a offsetaLength
- the a lengthorg.refcodes.component.OpenException
- the open exceptionCopyright © 2017. All rights reserved.