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>
TheBlockConsumer
is 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 void
writeDatagrams(DATA[] aDatagram)
Writes (sends) a datagram block to a listeningDatagramReceiver
orBlockReceiver
.void
writeDatagrams(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 listeningDatagramReceiver
orBlockReceiver
.- Parameters:
aDatagram
- The datagram to be pushed to the receivingDatagramReceiver
orBlockReceiver
.- 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
-
-