Package com.morpheusdata.core.util
Class RestApiUtil
java.lang.Object
com.morpheusdata.core.util.RestApiUtil
Deprecated.
Utility methods for calling external APIs in a standardized way.
- Since:
- 0.8.0
This utility is deprecated. Use
HttpApiClient
which is more efficient for API communications.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated.static interface
Deprecated. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.static ServiceResponse
Deprecated.static ServiceResponse
Deprecated.static ServiceResponse
callApi
(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) Deprecated.static ServiceResponse
callJsonApi
(String url, String path) Deprecated.static ServiceResponse
callJsonApi
(String url, String path, RestApiUtil.RestOptions opts) Deprecated.static ServiceResponse
callJsonApi
(String url, String path, RestApiUtil.RestOptions opts, String method) Deprecated.static ServiceResponse
callJsonApi
(String url, String path, String username, String password, RestApiUtil.RestOptions opts) Deprecated.static ServiceResponse
callJsonApi
(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) Deprecated.static ServiceResponse
callXmlApi
(String url, String path, RestApiUtil.RestOptions opts) Deprecated.static ServiceResponse
callXmlApi
(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) Deprecated.static void
shutdownClient
(org.apache.http.client.HttpClient httpClient) Deprecated.Wrapper method for shutting down an HttpClient connection Manager This is typically used when using a Keep-Alive connection managerstatic void
shutdownClient
(org.apache.http.conn.HttpClientConnectionManager connectionManager) Deprecated.
-
Constructor Details
-
RestApiUtil
public RestApiUtil()Deprecated.
-
-
Method Details
-
callApi
public static ServiceResponse callApi(String url, String path, String username, String password) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callApi
public static ServiceResponse callApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callApi
public static ServiceResponse callApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callXmlApi
public static ServiceResponse callXmlApi(String url, String path, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
callXmlApi
public static ServiceResponse callXmlApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxException
Exception
-
addRequiredHeader
public static Map<String,String> addRequiredHeader(Map<String, String> headers, String name, String value) Deprecated. -
shutdownClient
public static void shutdownClient(org.apache.http.client.HttpClient httpClient) Deprecated.Wrapper method for shutting down an HttpClient connection Manager This is typically used when using a Keep-Alive connection manager- Parameters:
httpClient
- the HttpClient we wish to permanently shutdown.
-
shutdownClient
public static void shutdownClient(org.apache.http.conn.HttpClientConnectionManager connectionManager) Deprecated.
-