public class RemoteProcessGroupUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
private com.sun.jersey.api.client.Client |
client |
private static int |
CONNECT_TIMEOUT |
static String |
CONTROLLER_URI_PATH |
private static int |
READ_TIMEOUT |
| Constructor and Description |
|---|
RemoteProcessGroupUtils(SSLContext sslContext) |
| Modifier and Type | Method and Description |
|---|---|
com.sun.jersey.api.client.ClientResponse |
get(URI uri,
int timeoutMillis)
Gets the content at the specified URI.
|
com.sun.jersey.api.client.ClientResponse |
get(URI uri,
int timeoutMillis,
Map<String,String> queryParams)
Gets the content at the specified URI using the given query parameters.
|
private com.sun.jersey.api.client.Client |
getClient(SSLContext sslContext)
Gets a client for the given sslContext
|
private org.apache.nifi.web.api.dto.ControllerDTO |
getController(URI uri,
int timeoutMillis) |
String |
getRemoteInstanceId(String uri,
int timeoutMillis) |
Integer |
getRemoteListeningPort(String uri,
int timeoutMillis)
Returns the port on which the remote instance is listening for Flow File
transfers, or
null if the remote instance is not configured
to use Site-to-Site transfers. |
private Integer |
getRemoteListeningPort(URI uri,
int timeoutMillis)
Returns the port on which the remote instance is listening for Flow File
transfers, or
null if the remote instance is not configured
to use Site-to-Site transfers. |
String |
getRemoteRootGroupId(String uri,
int timeoutMillis) |
private String |
getRemoteRootGroupId(URI uri,
int timeoutMillis) |
com.sun.jersey.api.client.ClientResponse |
head(URI uri,
int timeoutMillis)
Performs a HEAD request to the specified URI.
|
com.sun.jersey.api.client.ClientResponse |
issueRegistrationRequest(String baseApiUri)
Issues a registration request on behalf of the current user.
|
public static final String CONTROLLER_URI_PATH
private static final int CONNECT_TIMEOUT
private static final int READ_TIMEOUT
private final com.sun.jersey.api.client.Client client
public RemoteProcessGroupUtils(SSLContext sslContext)
public com.sun.jersey.api.client.ClientResponse get(URI uri, int timeoutMillis) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the URI to get the content oftimeoutMillis - the period of time to waitcom.sun.jersey.api.client.ClientHandlerException - issues handling the responsecom.sun.jersey.api.client.UniformInterfaceException - issues with the requestpublic com.sun.jersey.api.client.ClientResponse get(URI uri, int timeoutMillis, Map<String,String> queryParams) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the uri to get the content oftimeoutMillis - the period of time to wait for a responsequeryParams - the query params of the requestcom.sun.jersey.api.client.ClientHandlerException - issues with the responsecom.sun.jersey.api.client.UniformInterfaceException - issues with the requestpublic com.sun.jersey.api.client.ClientResponse head(URI uri, int timeoutMillis) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the uri to request the head oftimeoutMillis - the period of time to wait for a reponsecom.sun.jersey.api.client.ClientHandlerException - issues with the requestcom.sun.jersey.api.client.UniformInterfaceException - issues with the responseprivate com.sun.jersey.api.client.Client getClient(SSLContext sslContext)
sslContext - the ssl context to get a client forpublic Integer getRemoteListeningPort(String uri, int timeoutMillis) throws IOException
null if the remote instance is not configured
to use Site-to-Site transfers.uri - the base URI of the remote instance. This should include the
path only to the nifi-api level, as well as the protocol, host, and port.timeoutMillis - the period of time to wait for the portIOException - if an error occurs getting the remote port
informationpublic String getRemoteRootGroupId(String uri, int timeoutMillis) throws IOException
IOExceptionpublic String getRemoteInstanceId(String uri, int timeoutMillis) throws IOException
IOExceptionprivate Integer getRemoteListeningPort(URI uri, int timeoutMillis) throws IOException
null if the remote instance is not configured
to use Site-to-Site transfers.uri - the full URI to fetch, including the path.IOException - if unable to get portprivate String getRemoteRootGroupId(URI uri, int timeoutMillis) throws IOException
IOExceptionprivate org.apache.nifi.web.api.dto.ControllerDTO getController(URI uri, int timeoutMillis) throws IOException
IOExceptionpublic com.sun.jersey.api.client.ClientResponse issueRegistrationRequest(String baseApiUri)
baseApiUri - the URI to issue a request toCopyright © 2015 Apache NiFi Project. All rights reserved.