public class RESTQueryPublisher extends RESTPublisher
APPLICATION_JSON, CONTENT_TYPE
Constructor and Description |
---|
RESTQueryPublisher(org.apache.http.impl.client.CloseableHttpClient client,
String queryURL,
String resultURL,
int connectTimeout)
Create a RESTQueryPublisher from a
CloseableHttpClient , queryURL and resultURL. |
Modifier and Type | Method and Description |
---|---|
PubSubMessage |
send(PubSubMessage message)
Sends a
PubSubMessage . |
close, sendToURL
public RESTQueryPublisher(org.apache.http.impl.client.CloseableHttpClient client, String queryURL, String resultURL, int connectTimeout)
CloseableHttpClient
, queryURL and resultURL. The BulletConfig must
contain a valid url in the bullet.pubsub.rest.query.urls field.client
- The client.queryURL
- The URL to which to POST queries.resultURL
- The URL that will be added to the Metadata (results will be sent to this URL from the backend).connectTimeout
- The minimum time (ms) to wait for a connection to be made.public PubSubMessage send(PubSubMessage message)
Publisher
PubSubMessage
. The message might be modified so the sent message is returned.message
- The PubSubMessage
to be sent.PubSubMessage
.Copyright © 2021. All rights reserved.