public class RestInvocationHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RestInvocationHelper.RequestFailedException
Exception
|
Modifier and Type | Field and Description |
---|---|
static boolean |
USE_THREADS
Use daemon threads for REST call.
|
Constructor and Description |
---|
RestInvocationHelper()
Creates the helper.
|
Modifier and Type | Method and Description |
---|---|
IFuture<java.lang.String> |
invokeJson(IInternalAccess component,
java.lang.String uri,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> headers,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.Class<?> resttype,
boolean inurlparams)
Invokes the REST service for a JSON response.
|
IFuture<java.lang.String> |
invokeJson(IInternalAccess component,
java.lang.String uri,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> headers,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String postplainjson,
java.lang.Class<?> resttype,
boolean inurlparams)
Invokes the REST service for a JSON response.
|
static void |
performRequest(IExternalAccess exta,
java.lang.String uri,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> headers,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String postplainjson,
java.lang.Class<?> resttype,
boolean inurlparams,
Future<java.lang.String> ret)
Perform the REST call.
|
public RestInvocationHelper()
component
- The component using this helper.public IFuture<java.lang.String> invokeJson(IInternalAccess component, java.lang.String uri, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> headers, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.Class<?> resttype, boolean inurlparams)
uri
- URI to invoke.path
- Path to invoke.headers
- Header fields.params
- Parameters.public IFuture<java.lang.String> invokeJson(IInternalAccess component, java.lang.String uri, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> headers, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String postplainjson, java.lang.Class<?> resttype, boolean inurlparams)
uri
- URI to invoke.path
- Path to invoke.headers
- Header fields.params
- Parameters.public static final void performRequest(IExternalAccess exta, java.lang.String uri, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> headers, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String postplainjson, java.lang.Class<?> resttype, boolean inurlparams, Future<java.lang.String> ret)