A B C D E F G H I J M N O P R S T U V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- addQueryParameter(String, String, Object) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Adds a single query parameter to a URL.
- addQueryParameters(String, Map<String, ?>) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Adds the given query parameters to a URL without applying any filtering.
- addQueryParameters(String, Map<String, ?>, boolean) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Adds the given query parameters to a URL.
- AUTH_BASIC - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the authentication scheme Basic Auth.
- AUTH_BEARER - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the authentication scheme used for bearer tokens.
B
- basicConfig() - Static method in class org.eclipse.sw360.http.config.HttpClientConfig
-
Returns a basic
HttpClientConfiginstance. - body(Consumer<RequestBodyBuilder>) - Method in interface org.eclipse.sw360.http.RequestBuilder
-
Adds a request body to this builder.
- bodyStream() - Method in interface org.eclipse.sw360.http.Response
-
Returns an
InputStreamfor the body of this response; so the data received from the server can be streamed.
C
- CHARSET_UTF8 - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the charset UTF-8.
- checkResponse(ResponseProcessor<T>) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a
ResponseProcessorthat checks the HTTP status code to determine whether a request was successful. - checkResponse(ResponseProcessor<T>, String) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a
ResponseProcessorthat checks the HTTP status code to determine whether a request was successful and allows tagging the request. - checkResponse(ResponseProcessor<T>, Predicate<Response>) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a
ResponseProcessorthat checks whether a request was successful based on a given predicate. - checkResponse(ResponseProcessor<T>, Predicate<Response>, String) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a
ResponseProcessorthat checks whether a request was successful based on a given predicate and allows tagging the request. - CONTENT_ALL_STREAM - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the content type application/octet-stream.
- CONTENT_JSON - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the content type application/json.
- CONTENT_JSON_UTF8 - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the content type application/json with UTF-8 encoding.
- CONTENT_OCTET_STREAM - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the content type application/octet-stream.
- CONTENT_TEXT_PLAIN - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the content type text/plain.
- CONTENT_TYPE_FORM - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the content type for URL-encoded forms.
- createExceptionForResponse(Response, String) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Creates a
FailedRequestExceptionbased on the passed in response and request tag. - customObjectMapper() - Method in class org.eclipse.sw360.http.config.HttpClientConfig
-
Returns an
Optionalwith a custom JSON object mapper to be used for dealing with JSON payload.
D
- defaultProxySelector() - Static method in class org.eclipse.sw360.http.config.ProxySettings
-
Returns an instance of
ProxySettingsthat indicates that the defaultProxySelector(obtained via theProxySelector.getDefault()method) should be queried for each request. - DELETE - org.eclipse.sw360.http.RequestBuilder.Method
E
- equals(Object) - Method in class org.eclipse.sw360.http.config.HttpClientConfig
- equals(Object) - Method in class org.eclipse.sw360.http.config.ProxySettings
- execute(Consumer<? super RequestBuilder>, ResponseProcessor<? extends T>) - Method in interface org.eclipse.sw360.http.HttpClient
-
Executes an HTTP request asynchronously and returns a future object with the result.
- execute(Consumer<? super RequestBuilder>, ResponseProcessor<? extends T>) - Method in class org.eclipse.sw360.http.NewHttpClientImpl
F
- FailedRequestException - Exception in org.eclipse.sw360.http.utils
-
A special exception class to report errors caused by requests that have an unexpected (typically non-success) status code.
- FailedRequestException(String, int) - Constructor for exception org.eclipse.sw360.http.utils.FailedRequestException
-
Creates a new instance of
FailedRequestExceptionand initializes it with a tag and the status code that caused the exception. - FailedRequestException(String, int, String) - Constructor for exception org.eclipse.sw360.http.utils.FailedRequestException
-
Creates a new instance of
FailedRequestExceptionand initializes it with a tag, the error status code, and the message sent from the server as response to the failed request. - file(Path, String) - Method in interface org.eclipse.sw360.http.RequestBodyBuilder
-
Sets the request body as a file.
- fromConfig(boolean, String, int) - Static method in class org.eclipse.sw360.http.config.ProxySettings
-
Creates a new instance of
ProxySettingsthat is initialized from configuration settings.
G
- get(String) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a very simple
Consumerfor aRequestBuilderthat just configures the builder with the given URI. - GET - org.eclipse.sw360.http.RequestBuilder.Method
- getOrCreateObjectMapper() - Method in class org.eclipse.sw360.http.config.HttpClientConfig
-
Returns an
ObjectMapperinstance that is either the custom mapper which has been set explicitly or a newly created instance. - getProxyHost() - Method in class org.eclipse.sw360.http.config.ProxySettings
-
Returns the proxy host.
- getProxyPort() - Method in class org.eclipse.sw360.http.config.ProxySettings
-
Returns the proxy port.
- getStatusCode() - Method in exception org.eclipse.sw360.http.utils.FailedRequestException
-
Returns the response status code that caused this exception.
- getTag() - Method in exception org.eclipse.sw360.http.utils.FailedRequestException
-
Returns a tag to identify the failed request.
H
- hashCode() - Method in class org.eclipse.sw360.http.config.HttpClientConfig
- hashCode() - Method in class org.eclipse.sw360.http.config.ProxySettings
- hasStatus(int) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a predicate that checks a response for a specific status code.
- header(String) - Method in interface org.eclipse.sw360.http.Response
-
Returns the value of the header with the given name.
- header(String, String) - Method in interface org.eclipse.sw360.http.RequestBuilder
-
Sets a request header.
- HEADER_ACCEPT - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP header for defining the media type(s) accepted by the client.
- HEADER_AUTHORIZATION - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP Authorization header.
- HEADER_CONTENT_TYPE - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP header for setting the content type.
- headerNames() - Method in interface org.eclipse.sw360.http.Response
-
Returns a set with the names of the headers contained in the response.
- HttpClient - Interface in org.eclipse.sw360.http
-
The central interface for the execution of HTTP requests.
- HttpClientConfig - Class in org.eclipse.sw360.http.config
-
A class collecting all configuration options supported by the HTTP client library.
- HttpClientFactory - Interface in org.eclipse.sw360.http
-
Definition of an interface that allows the creation of an
HttpClientobject. - HttpClientFactoryImpl - Class in org.eclipse.sw360.http
-
An implementation of the
HttpClientFactoryinterface that creates client instances using underlying OkHttpClient objects. - HttpClientFactoryImpl() - Constructor for class org.eclipse.sw360.http.HttpClientFactoryImpl
- HttpConstants - Class in org.eclipse.sw360.http.utils
-
A class defining some frequently used constants related to HTTP requests and responses.
- HttpUtils - Class in org.eclipse.sw360.http.utils
-
A class providing static utility functions related to the usage of
HttpClientobjects.
I
- isDefaultProxySelectorUse() - Method in class org.eclipse.sw360.http.config.ProxySettings
-
Returns a flag whether the default proxy selector should be used.
- isNoProxy() - Method in class org.eclipse.sw360.http.config.ProxySettings
-
Returns a flag whether a proxy should be completely disabled.
- isProxyUse() - Method in class org.eclipse.sw360.http.config.ProxySettings
-
Returns a flag whether a proxy should be used.
- isSuccess() - Method in interface org.eclipse.sw360.http.Response
-
Returns a flag whether the request was successful.
- isSuccessStatus(int) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a flag whether the passed in response status code indicates a successful response.
J
- json(Object) - Method in interface org.eclipse.sw360.http.RequestBodyBuilder
-
Sets the request body as an object that is serialized to JSON.
- jsonResult(ObjectMapper, TypeReference<T>) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a
ResponseProcessorthat uses theObjectMapperspecified to map the JSON payload of a response to an object of the type defined by the given reference. - jsonResult(ObjectMapper, Class<T>) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a
ResponseProcessorthat uses theObjectMapperspecified to map the JSON payload of a response to an object of the given result class. - jsonResultNew(ObjectMapper, Class<T>) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a
ResponseProcessorthat uses theObjectMapperspecified to map the JSON payload of a response to an object of the given result class.
M
- method(RequestBuilder.Method) - Method in interface org.eclipse.sw360.http.RequestBuilder
-
Sets the HTTP method to be used for the request.
- multiPart(String, Consumer<RequestBodyBuilder>) - Method in interface org.eclipse.sw360.http.RequestBuilder
-
Adds a part of a multi-part request to this builder.
N
- newHttpClient(HttpClientConfig) - Method in interface org.eclipse.sw360.http.HttpClientFactory
-
Creates a new instance of
HttpClientand configures it according to the passed in configuration object. - newHttpClient(HttpClientConfig) - Method in class org.eclipse.sw360.http.HttpClientFactoryImpl
- newHttpClientAlt(HttpClientConfig) - Method in interface org.eclipse.sw360.http.HttpClientFactory
-
Creates a new instance of
HttpClientand configures it according to the passed in configuration object. - newHttpClientAlt(HttpClientConfig) - Method in class org.eclipse.sw360.http.HttpClientFactoryImpl
- NewHttpClientImpl - Class in org.eclipse.sw360.http
-
This class implements the java native client library.
- NewHttpClientImpl(HttpClient, ObjectMapper) - Constructor for class org.eclipse.sw360.http.NewHttpClientImpl
-
Creates a new instance of
NewHttpClientImplwith the dependencies passed in. - noProxy() - Static method in class org.eclipse.sw360.http.config.ProxySettings
-
Returns an instance of
ProxySettingsthat indicates that no proxy is to be used. - nullProcessor() - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns a special
ResponseProcessorthat does not do any processing, but just returns the value null.
O
- org.eclipse.sw360.http - package org.eclipse.sw360.http
- org.eclipse.sw360.http.config - package org.eclipse.sw360.http.config
- org.eclipse.sw360.http.utils - package org.eclipse.sw360.http.utils
P
- PATCH - org.eclipse.sw360.http.RequestBuilder.Method
- POST - org.eclipse.sw360.http.RequestBuilder.Method
- process(Response) - Method in interface org.eclipse.sw360.http.ResponseProcessor
-
Processes the response of a request to produce a result.
- proxySettings() - Method in class org.eclipse.sw360.http.config.HttpClientConfig
-
Returns a
ProxySettingsobject with the proxy configuration to be used. - ProxySettings - Class in org.eclipse.sw360.http.config
-
A class defining proxy settings for HTTP clients.
- PUT - org.eclipse.sw360.http.RequestBuilder.Method
R
- RequestBodyBuilder - Interface in org.eclipse.sw360.http
-
A builder interface for defining the body of a request.
- RequestBuilder - Interface in org.eclipse.sw360.http
-
An interface that allows the definition of HTTP requests to be executed.
- RequestBuilder.Method - Enum in org.eclipse.sw360.http
-
An enumeration class for the HTTP methods supported by the HTTP client.
- Response - Interface in org.eclipse.sw360.http
-
An interface describing the response of an HTTP request.
- ResponseProcessor<T> - Interface in org.eclipse.sw360.http
-
An interface for components that process the response of an HTTP request and generate a result object.
S
- STATUS_ACCEPTED - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 202 ACCEPTED indicating that a request is processed asynchronously.
- STATUS_CREATED - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 201 CREATED indicating that a resource has been created successfully.
- STATUS_ERR_BAD_REQUEST - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 400 BAD REQUEST indicating a general problem with a request sent by a client.
- STATUS_ERR_NOT_FOUND - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 404 NOT FOUND indicating that the resource requested does not exist.
- STATUS_ERR_SERVER - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 500 INTERNAL SERVER ERROR indicating a general problem on server side.
- STATUS_ERR_UNAUTHORIZED - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 401 UNAUTHORIZED indicating missing or invalid access credentials.
- STATUS_MULTI_STATUS - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 207 MULTI_STATUS that is returned for operations affecting multiple entities.
- STATUS_NO_CONTENT - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 204 NO_CONTENT indicating that a request has a null body.
- STATUS_OK - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the HTTP status code 200 OK, indicating a successful request.
- statusCode() - Method in interface org.eclipse.sw360.http.Response
-
Returns the HTTP status code of this response.
- string(String, String) - Method in interface org.eclipse.sw360.http.RequestBodyBuilder
-
Sets the request body as a string.
- SUCCESS_STATUS - Static variable in class org.eclipse.sw360.http.utils.HttpUtils
-
A predicate that can be used by the
checkResponse(ResponseProcessor, Predicate)method to check whether a response was successful.
T
- toString() - Method in class org.eclipse.sw360.http.config.ProxySettings
U
- unwrapCompletionException(Throwable) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Returns the first exception in a chain that is not a
CompletionException. - uri(String) - Method in interface org.eclipse.sw360.http.RequestBuilder
-
Set the URI for the request.
- URL_PATH_SEPARATOR - Static variable in class org.eclipse.sw360.http.utils.HttpConstants
-
Constant for the character used as separator between URL path segments.
- urlEncode(String) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Performs URL encoding on the given string.
- useProxy(String, int) - Static method in class org.eclipse.sw360.http.config.ProxySettings
-
Creates a new instance of
ProxySettingsthat uses the specified settings for the proxy.
V
- valueOf(String) - Static method in enum org.eclipse.sw360.http.RequestBuilder.Method
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum org.eclipse.sw360.http.RequestBuilder.Method
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- waitFor(Future<? extends T>) - Static method in class org.eclipse.sw360.http.utils.HttpUtils
-
Blocks until the given future is completed, returns its result, and handles occurring exceptions.
- withObjectMapper(ObjectMapper) - Method in class org.eclipse.sw360.http.config.HttpClientConfig
-
Returns a new instance of
HttpClientConfigthat contains the same settings as this instance, but with the JSON object mapper set to the parameter specified. - withProxySettings(ProxySettings) - Method in class org.eclipse.sw360.http.config.HttpClientConfig
-
Returns a new instance of
HttpClientConfigthat contains the same settings as this instance, but with the proxy configuration set to the parameter specified.
All Classes All Packages