public interface DataRequestHandler
Source this listener will be notified of any detailed data requests.| Modifier and Type | Method and Description |
|---|---|
void |
cancelRequest(Source source,
org.opendof.core.oal.DOFObjectID sink,
long requestID)
Cancel a request for detailed data.
|
void |
requestValues(Source source,
org.opendof.core.oal.DOFObjectID sink,
long requestID,
org.opendof.core.oal.DOFObjectID deviceID,
org.opendof.core.oal.DOFInterfaceID propertyIID,
int propertyItemID,
java.util.Date start,
int duration,
int timeout)
A request for detailed data from the specified sink.
|
void requestValues(Source source, org.opendof.core.oal.DOFObjectID sink, long requestID, org.opendof.core.oal.DOFObjectID deviceID, org.opendof.core.oal.DOFInterfaceID propertyIID, int propertyItemID, java.util.Date start, int duration, int timeout) throws org.opendof.datatransfer.OutOfRangeException, org.opendof.datatransfer.OutOfResourcesException, org.opendof.datatransfer.UnknownDataException, org.opendof.datatransfer.DuplicateRequestIDException, java.lang.Exception
Source.submitValueSet(org.opendof.core.oal.DOFObjectID, org.opendof.datatransfer.ValueSet, long).
Once completed, the sink should be notified via Source.completeRequest(org.opendof.core.oal.DOFObjectID, long, org.opendof.datatransfer.DetailRequestStatus).source - The Source instance on which this handler was added. Must not be null.sink - The identifier of the sink making the request.requestID - The identifier of the request. This, along with the sink ID, uniquely identifies a request.deviceID - The device for which data is being requested.propertyIID - The IID of the property for which data is desired.propertyItemID - The item ID of the property for which data is desired.start - The first timestamp for which data is desired.duration - The duration of the request in milliseconds. Starting at firstTimestamp, all known data for the length of
duration should be sent to the sink.timeout - The timeout of the operation in milliseconds. If the timeout is reached before the request has been completed,
Source.completeRequest(org.opendof.core.oal.DOFObjectID, long, org.opendof.datatransfer.DetailRequestStatus) should be called with status DetailRequestStatus.TIMEOUT.property - The property for which information is desired.org.opendof.datatransfer.OutOfRangeException - Thrown if the request is outside the time range for which the source stores data or if timeout is
greater than the source allows.org.opendof.datatransfer.UnknownDataException - Thrown if a request for detailed data is made for an unknown device or property.org.opendof.datatransfer.OutOfResourcesException - Thrown if there are insufficient resources to persist or process the request.org.opendof.datatransfer.DuplicateRequestIDException - Thrown if a request with the specified requestID already exists for sink.java.lang.Exception - Thrown if the request handler fails to handle the request due to an undefined error.void cancelRequest(Source source, org.opendof.core.oal.DOFObjectID sink, long requestID)
source - The Source instance on which this handler was added. Must not be null.sink - The sink cancelling the request.requestID - The identifier of the request to be canceled.