public class AsyncEdgePoster extends JsonEdgePoster
ObservationPoster.PostCallback
ACK_PROPERTY
Constructor and Description |
---|
AsyncEdgePoster(java.lang.String url,
java.lang.String uuid) |
AsyncEdgePoster(java.lang.String url,
java.lang.String uuid,
int connectTimeout,
int readTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
abortPostAsync()
Cancels any transaction currently in progress.
|
void |
doPostAsync(java.util.List<Observation> observations,
ObservationPoster.PostCallback callback)
Asynchronous version of the post transaction method,
sending observations to the edge.
|
void |
doPostAsync(Observation observation,
ObservationPoster.PostCallback callback)
Version of doPostAsync for single Observation.
|
doPost, getContentLimit, setContentLimit
public AsyncEdgePoster(java.lang.String url, java.lang.String uuid)
url
- edge URLuuid
- identifier of the posterpublic AsyncEdgePoster(java.lang.String url, java.lang.String uuid, int connectTimeout, int readTimeout)
url
- edge URLuuid
- identifier of the posterconnectTimeout
- connection timeout for transactions (milliseconds), 0 for nonereadTimeout
- read timeout for transactions (milliseconds), 0 for nonepublic void doPostAsync(java.util.List<Observation> observations, ObservationPoster.PostCallback callback)
doPostAsync
in interface ObservationPoster
doPostAsync
in class JsonEdgePoster
observations
- objects to postcallback
- called when the transaction is overpublic void doPostAsync(Observation observation, ObservationPoster.PostCallback callback)
doPostAsync
in interface ObservationPoster
doPostAsync
in class JsonEdgePoster
observation
- object to postcallback
- called when the transaction is overpublic void abortPostAsync()
ObservationPoster
abortPostAsync
in interface ObservationPoster
abortPostAsync
in class JsonEdgePoster