public class HTTPQueryHandler extends QueryHandler
send(PubSubMessage)
or fail(QueryError)
call is supported. Use getResult()
to get a
CompletableFuture
that resolves to the single result or error.complete
Constructor and Description |
---|
HTTPQueryHandler() |
Modifier and Type | Method and Description |
---|---|
void |
fail(QueryError cause)
Fail the query.
|
CompletableFuture<String> |
getResult()
Get the single eventual result sent to this handler.
|
void |
send(com.yahoo.bullet.pubsub.PubSubMessage message)
Send a
PubSubMessage to the query handler. |
acknowledge, complete, fail
public void send(com.yahoo.bullet.pubsub.PubSubMessage message)
QueryHandler
PubSubMessage
to the query handler.send
in class QueryHandler
message
- The PubSubMessage containing a response.public void fail(QueryError cause)
QueryHandler
fail
in class QueryHandler
cause
- is the QueryError
that caused the fail to be invoked.public CompletableFuture<String> getResult()
CompletableFuture
of the single result that will eventually (but not guaranteed) to be added.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.