org.qi4j.api.io
Interface Sender<T,SenderThrowableType extends Throwable>


public interface Sender<T,SenderThrowableType extends Throwable>

Sender of items for a particular transfer from an Input to an Output


Method Summary
<ReceiverThrowableType extends Throwable>
void
sendTo(Receiver<? super T,ReceiverThrowableType> receiver)
          The sender should send all items it holds to the receiver by invoking receiveItem for each item.
 

Method Detail

sendTo

<ReceiverThrowableType extends Throwable> void sendTo(Receiver<? super T,ReceiverThrowableType> receiver)
            throws ReceiverThrowableType extends Throwable,
                   SenderThrowableType extends Throwable
The sender should send all items it holds to the receiver by invoking receiveItem for each item. If the receive fails it should properly close any open resources.

Type Parameters:
ReceiverThrowableType -
Parameters:
receiver -
Throws:
ReceiverThrowableType
SenderThrowableType
ReceiverThrowableType extends Throwable