Class AbstractPrefetchInputStreamReceiver<DATA extends Serializable>

java.lang.Object
org.refcodes.component.AbstractConnectable
org.refcodes.component.AbstractConnectableAutomaton
org.refcodes.io.AbstractDatagramsReceiver<DATA>
org.refcodes.io.AbstractPrefetchInputStreamReceiver<DATA>
Type Parameters:
DATA - The type of the datagram to be operated with.
All Implemented Interfaces:
org.refcodes.component.Closable, org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.ClosedAccessor, org.refcodes.component.ConnectableComponent, org.refcodes.component.ConnectableComponent.ConnectableAutomaton, org.refcodes.component.ConnectionStatusAccessor, org.refcodes.component.OpenedAccessor, Availability, DatagramDestination<DATA>, DatagramReceiver<DATA>, DatagramsDestination<DATA>, DatagramsReceiver<DATA>, Receivable
Direct Known Subclasses:
PrefetchBidirectionalStreamConnectionTransceiver, PrefetchInputStreamConnectionReceiver

public abstract class AbstractPrefetchInputStreamReceiver<DATA extends Serializable> extends AbstractDatagramsReceiver<DATA>
Abstract implementation of the DatagramsReceiver interface. As of the prefetching functionality, a separate daemon thread (retrieved via an ExecutorService) reads from the provided InputStream and places the datagrams into a datagram queue until the datagram queue's capacity is reached. If the queue is empty, then the AbstractDatagramsReceiver.receive() ( AbstractDatagramsReceiver.receiveAll()) method is blocked until the daemon thread places new datagrams into the queue. See also AbstractDatagramsReceiver.