public class AbstractJerseyClient extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AbstractJerseyClient.NiFiRegistryAction<T>
An action to execute with the given return type.
|
| Constructor and Description |
|---|
AbstractJerseyClient(Map<String,String> headers) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
executeAction(String errorMessage,
AbstractJerseyClient.NiFiRegistryAction<T> action)
Executes the given action and returns the result.
|
protected Map<String,String> |
getHeaders() |
protected Throwable |
getIOExceptionCause(Throwable e) |
protected javax.ws.rs.client.Invocation.Builder |
getRequestBuilder(javax.ws.rs.client.WebTarget webTarget)
Creates a new Invocation.Builder for the given WebTarget with the headers added to the builder.
|
protected javax.ws.rs.client.Invocation.Builder getRequestBuilder(javax.ws.rs.client.WebTarget webTarget)
webTarget - the target for the requestprotected <T> T executeAction(String errorMessage, AbstractJerseyClient.NiFiRegistryAction<T> action) throws NiFiRegistryException, IOException
T - the return type of the actionaction - the action to executeerrorMessage - the message to use if a NiFiRegistryException is thrownNiFiRegistryException - if any exception other than IOException is encounteredIOException - if an I/O error occurs communicating with the registryCopyright © 2018 Apache NiFi Project. All rights reserved.