public abstract class RESTPublisher extends Object implements Publisher
| Modifier and Type | Field and Description |
|---|---|
static String |
APPLICATION_JSON |
static String |
CONTENT_TYPE |
| Constructor and Description |
|---|
RESTPublisher(org.apache.http.impl.client.CloseableHttpClient client,
int connectTimeout)
Create a RESTQueryPublisher from a
CloseableHttpClient. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
sendToURL(String url,
PubSubMessage message)
Send the
PubSubMessage to the given url. |
public static final String APPLICATION_JSON
public static final String CONTENT_TYPE
public RESTPublisher(org.apache.http.impl.client.CloseableHttpClient client,
int connectTimeout)
CloseableHttpClient.client - The client.connectTimeout - The minimum time (ms) to wait for a connection to be made.public void close()
close in interface AutoCloseableprotected void sendToURL(String url, PubSubMessage message)
PubSubMessage to the given url.url - The url to which to send the message.message - The message to send.Copyright © 2021. All rights reserved.