public abstract class RobustHTTPConnection extends RobustIPConnection
Helper class for handling automatic reconnections to HTTP services
checkReachability
connectConfig, connected, module, remoteServiceName, waitThread
Constructor and Description |
---|
RobustHTTPConnection(AbstractModule<?> module,
RobustIPConnectionConfig config,
String remoteServiceName) |
Modifier and Type | Method and Description |
---|---|
HttpURLConnection |
tryConnectGET(String url)
Try to connect to URL using GET method
|
HttpURLConnection |
tryConnectPOST(String url,
String postData)
Try to connect to URL and send POST data
|
tryConnect, tryConnectTCP
cancel, isConnected, reconnect, tryConnect, updateConfig, waitForConnection
public RobustHTTPConnection(AbstractModule<?> module, RobustIPConnectionConfig config, String remoteServiceName)
public HttpURLConnection tryConnectGET(String url) throws IOException
url
- URL to connect toIOException
- if connection was unsuccessful and shouldn't be retriedpublic HttpURLConnection tryConnectPOST(String url, String postData) throws IOException
url
- URL to connect topostData
- data to send as POSTIOException
- if connection was unsuccessful and shouldn't be retriedCopyright © 2016 Sensia Software LLC. All rights reserved.