public abstract class AbstractHttpClientPlugin extends AbstractHobsonPlugin
| Constructor and Description | 
|---|
AbstractHttpClientPlugin(java.lang.String pluginId,
                        java.lang.String version,
                        java.lang.String description)  | 
AbstractHttpClientPlugin(java.lang.String pluginId,
                        java.lang.String version,
                        java.lang.String description,
                        HttpClientChannel httpChannel)  | 
| Modifier and Type | Method and Description | 
|---|---|
WebSocketHandle | 
createWebSocket(java.net.URI uri)
Creates a WebSocket client. 
 | 
WebSocketHandle | 
createWebSocket(java.net.URI uri,
               java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> headers)
Creates a WebSocket client. 
 | 
abstract void | 
onHttpRequestFailure(java.lang.Throwable cause,
                    java.lang.Object context)
Callback for unsuccessful HTTP responses. 
 | 
abstract void | 
onHttpResponse(HttpResponse response,
              java.lang.Object context)
Callback for successful HTTP responses. 
 | 
void | 
sendHttpRequest(java.net.URI uri,
               HttpRequest.Method method,
               java.util.Map<java.lang.String,java.lang.String> headers,
               java.util.Collection<Cookie> cookies,
               byte[] body,
               java.lang.Object context)
Sends an HTTP request. 
 | 
void | 
sendHttpRequest(java.net.URI uri,
               HttpRequest.Method method,
               java.util.Map<java.lang.String,java.lang.String> headers,
               java.util.Collection<Cookie> cookies,
               java.lang.Object context)
Sends an HTTP request. 
 | 
void | 
sendHttpRequest(java.net.URI uri,
               HttpRequest.Method method,
               java.util.Map<java.lang.String,java.lang.String> headers,
               java.lang.Object context)
Sends an HTTP request. 
 | 
void | 
sendHttpRequest(java.net.URI uri,
               HttpRequest.Method method,
               java.lang.Object context)
Sends an HTTP request. 
 | 
addJobStatusMessage, deleteDeviceProxy, executeInEventLoop, executeTask, getAccessManager, getActionClass, getActionClasses, getConfigurationClass, getConfigurationPropertyTypes, getContext, getDataDirectory, getDataFile, getDescription, getDescriptor, getDeviceAdvertisementSnapshot, getDeviceConfigurationProperty, getDeviceLastCheckin, getDeviceProxies, getDeviceProxy, getDeviceVariableState, getDeviceVariableState, getDiscoManager, getEventLoopExecutor, getHubManager, getLocalHub, getName, getPublishedDeviceDescriptions, getRefreshInterval, getStatus, getTaskManager, getTaskProvider, getType, hasDeviceProxy, hasDeviceVariable, hasDeviceVariableState, hasDeviceVariableState, hasTaskProvider, onDeviceConfigurationUpdateEvent, onDeviceDeletedEvent, onDeviceVariablesUpdate, onHandleTaskEvents, onPluginConfigurationUpdate, onPluginConfigurationUpdateEvent, onRefresh, onSetDeviceVariables, postEvent, publishActionProvider, publishDeviceAdvertisement, publishDeviceProxy, publishDeviceProxy, publishTaskConditionClass, scheduleAtFixedRateInEventLoop, setAccessManager, setActionManager, setDeviceConfigurationProperties, setDeviceConfigurationProperty, setDeviceManager, setDiscoManager, setEventManager, setGlobalVariable, setGlobalVariables, setHubManager, setPluginConfigurationProperty, setPluginManager, setStatus, setTaskManager, setTaskProviderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonShutdown, onStartuppublic AbstractHttpClientPlugin(java.lang.String pluginId,
                                java.lang.String version,
                                java.lang.String description)
public AbstractHttpClientPlugin(java.lang.String pluginId,
                                java.lang.String version,
                                java.lang.String description,
                                HttpClientChannel httpChannel)
public void sendHttpRequest(java.net.URI uri,
                            HttpRequest.Method method,
                            java.lang.Object context)
uri - the URI to send the request tomethod - the request methodcontext - a context object that will be returned in the response callback (or null if one is not needed)public void sendHttpRequest(java.net.URI uri,
                            HttpRequest.Method method,
                            java.util.Map<java.lang.String,java.lang.String> headers,
                            java.lang.Object context)
uri - the URI to send the request tomethod - the request methodheaders - request headers (or null if none)context - a context object that will be returned in the response callback (or null if one is not needed)public void sendHttpRequest(java.net.URI uri,
                            HttpRequest.Method method,
                            java.util.Map<java.lang.String,java.lang.String> headers,
                            java.util.Collection<Cookie> cookies,
                            java.lang.Object context)
uri - the URI to send the request tomethod - the request methodheaders - request headers (or null if none)cookies - cookies to include in the request (or null if none)context - a context object that will be returned in the response callback (or null if one is not needed)public void sendHttpRequest(java.net.URI uri,
                            HttpRequest.Method method,
                            java.util.Map<java.lang.String,java.lang.String> headers,
                            java.util.Collection<Cookie> cookies,
                            byte[] body,
                            java.lang.Object context)
uri - the URI to send the request tomethod - the request methodheaders - request headers (or null if none)cookies - cookies to include in the request (or null if none)body - the response bodycontext - a context object that will be returned in the response callback (or null if one is not needed)public WebSocketHandle createWebSocket(java.net.URI uri)
uri - the URI to connect topublic WebSocketHandle createWebSocket(java.net.URI uri, java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> headers)
uri - the URI to connect toheaders - HTTP request headers to include in the connection requestpublic abstract void onHttpResponse(HttpResponse response, java.lang.Object context)
response - the response objectcontext - the context object passed in the requestpublic abstract void onHttpRequestFailure(java.lang.Throwable cause,
                                          java.lang.Object context)
cause - the cause of the failurecontext - the context object passed in the requestCopyright © 2015 Whizzo Software LLC. All rights reserved.