Class GenericRequest
java.lang.Object
org.qubership.integration.platform.engine.opensearch.ism.model.rest.GenericRequest
- All Implemented Interfaces:
org.opensearch.client.opensearch.generic.Request,org.opensearch.client.transport.GenericSerializable
public class GenericRequest
extends Object
implements org.opensearch.client.transport.GenericSerializable, org.opensearch.client.opensearch.generic.Request
Generic HTTP request to OpenSearch, copied from org.opensearch.client.opensearch.generic.GenericRequest
-
Constructor Summary
ConstructorsConstructorDescriptionGenericRequest(String method, String endpoint, Collection<Map.Entry<String, String>> headers) Create the GenericRequest.GenericRequest(String method, String endpoint, Collection<Map.Entry<String, String>> headers, Map<String, String> parameters, org.opensearch.client.opensearch.generic.Body body) Create the GenericRequest. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare two requests for equalityOptional<org.opensearch.client.opensearch.generic.Body> getBody()The body of the request.The path of the request (without scheme, host, port, or prefix).The HTTP method.Query string parameters.inthashCode()Calculate the hash code of the requestserialize(OutputStream out) toString()Convert request to string representation
-
Constructor Details
-
GenericRequest
Create the GenericRequest.- Parameters:
method- the HTTP methodendpoint- the path of the request (without scheme, host, port, or prefix)headers- list of headers
-
GenericRequest
public GenericRequest(String method, String endpoint, Collection<Map.Entry<String, String>> headers, Map<String, String> parameters, @Nullable org.opensearch.client.opensearch.generic.Body body) Create the GenericRequest.- Parameters:
method- the HTTP methodendpoint- the path of the request (without scheme, host, port, or prefix)headers- list of headersparameters- query parametersbody- optional body
-
-
Method Details
-
getMethod
The HTTP method.- Specified by:
getMethodin interfaceorg.opensearch.client.opensearch.generic.Request
-
getEndpoint
The path of the request (without scheme, host, port, or prefix).- Specified by:
getEndpointin interfaceorg.opensearch.client.opensearch.generic.Request
-
getParameters
Query string parameters. The returned map is an unmodifiable view of the map in the request.- Specified by:
getParametersin interfaceorg.opensearch.client.opensearch.generic.Request
-
getHeaders
- Specified by:
getHeadersin interfaceorg.opensearch.client.opensearch.generic.Request
-
getBody
The body of the request. Ifnullthen no body is sent with the request.- Specified by:
getBodyin interfaceorg.opensearch.client.opensearch.generic.Request
-
toString
Convert request to string representation -
equals
Compare two requests for equality -
hashCode
public int hashCode()Calculate the hash code of the request -
serialize
- Specified by:
serializein interfaceorg.opensearch.client.transport.GenericSerializable
-