net.sf.jabb.dstream.StreamDataSupplierWithIdAndRange Maven / Gradle / Ivy
/**
*
*/
package net.sf.jabb.dstream;
import java.util.function.Function;
import net.sf.jabb.dstream.ex.DataStreamInfrastructureException;
/**
* @author James Hu
* @param type of the message
* @param type of the range
*/
public interface StreamDataSupplierWithIdAndRange extends StreamDataSupplierWithId {
/**
* Receive data from the supplier within range. Reference: {@link StreamDataSupplier#receive(Function, String, java.time.Instant)}
* @param receiver the receiver
* @param startPosition the start position for the receiving, if it is null or empty string then the from position of the range will be used
* @param endPosition the end position for the receiving, if it is null or empty string then the to position of the range will be used
* @return the receive status
* @throws DataStreamInfrastructureException if exception happens in the infrastructure
*/
ReceiveStatus receiveInRange(Function receiver, String startPosition, String endPosition) throws DataStreamInfrastructureException;
/**
* Get the from
* @return the from
*/
R getFrom();
/**
* Get the to
* @return the to
*/
R getTo();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy