Package com.hazelcast.spi.utils
Class RestClient
java.lang.Object
com.hazelcast.spi.utils.RestClient
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default value of -1 results in connection timeout not being explicitly definedstatic final int
HTTP status code 404 NOT FOUNDstatic final int
HTTP status code 200 OK -
Method Summary
Modifier and TypeMethodDescriptionstatic RestClient
static RestClient
static RestClient
createWithSSL
(String url, String caCertificate) static RestClient
createWithSSL
(String url, String caCertificate, int connectTimeoutSeconds) expectResponseCodes
(Integer... codes) get()
post()
put()
Issues a watch request to a Kubernetes resource, starting with the givenresourceVersion
.withHeader
(String name, String value) withHeaders
(Map<String, String> headers) withRequestTimeoutSeconds
(int timeoutSeconds) withRetries
(int retries)
-
Field Details
-
HTTP_OK
public static final int HTTP_OKHTTP status code 200 OK- See Also:
-
HTTP_NOT_FOUND
public static final int HTTP_NOT_FOUNDHTTP status code 404 NOT FOUND- See Also:
-
DEFAULT_CONNECT_TIMEOUT_SECONDS
public static final int DEFAULT_CONNECT_TIMEOUT_SECONDSDefault value of -1 results in connection timeout not being explicitly defined- See Also:
-
-
Method Details
-
create
-
create
-
createWithSSL
-
createWithSSL
-
withHeaders
-
withHeader
-
withBody
-
withRequestTimeoutSeconds
-
withRetries
-
expectResponseCodes
-
get
-
post
-
put
-
watch
Issues a watch request to a Kubernetes resource, starting with the givenresourceVersion
. Since a watch implies a stream of updates from the server will be consumed, unlike other methods in this class, it is the responsibility of the consumer to disconnect the connection (by invokingRestClient.WatchResponse.disconnect()
) once the watch is no longer required.- Throws:
RestClientException
-