Package org.refcodes.io
Interface BlockConsumer<DATA extends java.io.Serializable>
-
- 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 Known Subinterfaces:
BidirectionalConnectionTransceiver<DATA,INPUT,OUTPUT>,BidirectionalStreamConnectionTransceiver<DATA>,BlockSender<DATA>,BlockTransceiver<DATA>,ConnectionSender<DATA,CON>,ConnectionTransceiver<DATA,CON>,Consumer<DATA>,LoopbackSender<DATA>,LoopbackTransceiver<DATA>,OutputStreamConnectionSender<DATA>,Sender<DATA>,Transceiver<DATA>
- All Known Implementing Classes:
AbstractSender,BidirectionalStreamConnectionTransceiverImpl,BidirectionalStreamTransceiverImpl,LoopbackSenderImpl,LoopbackTransceiverImpl,OutputStreamConnectionSenderImpl,OutputStreamSenderImpl,PrefetchBidirectionalStreamConnectionTransceiverImpl,PrefetchBidirectionalStreamTransceiverImpl,SenderDecorator
- 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 BlockConsumer<DATA extends java.io.Serializable>TheBlockConsumeris used to send datagram blocks (arrays) in a unified way.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidwriteDatagrams(DATA[] aDatagram)Writes (sends) a datagram block to a listeningDatagramReceiverorBlockReceiver.voidwriteDatagrams(DATA[] aDatagram, int aOffset, int aLength)Write datagrams.
-
-
-
Method Detail
-
writeDatagrams
default void writeDatagrams(DATA[] aDatagram) throws org.refcodes.component.OpenException
Writes (sends) a datagram block to a listeningDatagramReceiverorBlockReceiver.- Parameters:
aDatagram- The datagram to be pushed to the receivingDatagramReceiverorBlockReceiver.- Throws:
org.refcodes.component.OpenException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
writeDatagrams
void writeDatagrams(DATA[] aDatagram, int aOffset, int aLength) throws org.refcodes.component.OpenException
Write datagrams.- Parameters:
aDatagram- the datagramaOffset- the offsetaLength- the length- Throws:
org.refcodes.component.OpenException- the open exception
-
-