public abstract class AbstractODataRequest extends AbstractRequest implements org.apache.olingo.client.api.communication.request.ODataRequest
CUDRequestFactory,
BatchRequestFactory,
InvokeRequestFactory| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.client.HttpClient |
httpClient
HTTP client.
|
protected org.apache.olingo.commons.api.http.HttpMethod |
method
OData request method.
|
protected org.apache.olingo.client.api.ODataClient |
odataClient |
protected org.apache.olingo.client.api.communication.header.ODataHeaders |
odataHeaders
OData request header.
|
protected org.apache.http.client.methods.HttpUriRequest |
request
HTTP request.
|
protected URI |
uri
Target URI.
|
LOG| Modifier | Constructor and Description |
|---|---|
protected |
AbstractODataRequest(org.apache.olingo.client.api.ODataClient odataClient,
org.apache.olingo.commons.api.http.HttpMethod method,
URI uri)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.olingo.client.api.communication.request.ODataRequest |
addCustomHeader(String name,
String value) |
protected org.apache.http.HttpResponse |
doExecute()
Builds the request and execute it.
|
String |
getAccept() |
String |
getContentType() |
abstract org.apache.olingo.commons.api.format.ContentType |
getDefaultFormat() |
org.apache.olingo.client.api.communication.header.ODataHeaders |
getHeader()
Gets request headers.
|
String |
getHeader(String name) |
Collection<String> |
getHeaderNames() |
String |
getIfMatch() |
String |
getIfNoneMatch() |
org.apache.olingo.commons.api.http.HttpMethod |
getMethod() |
String |
getPrefer() |
<V extends org.apache.olingo.client.api.communication.response.ODataResponse> |
getResponseTemplate()
Gets an empty response that can be initialized by a stream.
|
URI |
getURI() |
InputStream |
rawExecute() |
org.apache.olingo.client.api.communication.request.ODataRequest |
setAccept(String value) |
org.apache.olingo.client.api.communication.request.ODataRequest |
setContentType(String value) |
org.apache.olingo.client.api.communication.request.ODataRequest |
setIfMatch(String value) |
org.apache.olingo.client.api.communication.request.ODataRequest |
setIfNoneMatch(String value) |
org.apache.olingo.client.api.communication.request.ODataRequest |
setPrefer(String value) |
void |
setURI(URI uri) |
org.apache.olingo.client.api.communication.request.ODataRequest |
setXHTTPMethod(String value) |
byte[] |
toByteArray() |
checkRequest, checkResponseprotected final org.apache.olingo.client.api.ODataClient odataClient
protected final org.apache.olingo.commons.api.http.HttpMethod method
protected final org.apache.olingo.client.api.communication.header.ODataHeaders odataHeaders
protected URI uri
protected org.apache.http.client.HttpClient httpClient
protected org.apache.http.client.methods.HttpUriRequest request
protected AbstractODataRequest(org.apache.olingo.client.api.ODataClient odataClient,
org.apache.olingo.commons.api.http.HttpMethod method,
URI uri)
odataClient - client instance getting this requestmethod - HTTP request method. If configured X-HTTP-METHOD header will be used.uri - OData request URI.public abstract org.apache.olingo.commons.api.format.ContentType getDefaultFormat()
public URI getURI()
getURI in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic void setURI(URI uri)
setURI in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic Collection<String> getHeaderNames()
getHeaderNames in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic String getHeader(String name)
getHeader in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.request.ODataRequest setAccept(String value)
setAccept in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.request.ODataRequest setIfMatch(String value)
setIfMatch in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.request.ODataRequest setIfNoneMatch(String value)
setIfNoneMatch in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.request.ODataRequest setPrefer(String value)
setPrefer in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.request.ODataRequest setXHTTPMethod(String value)
setXHTTPMethod in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.request.ODataRequest setContentType(String value)
setContentType in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.request.ODataRequest addCustomHeader(String name, String value)
addCustomHeader in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic String getAccept()
getAccept in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic String getIfMatch()
getIfMatch in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic String getIfNoneMatch()
getIfNoneMatch in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic String getPrefer()
getPrefer in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic String getContentType()
getContentType in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.commons.api.http.HttpMethod getMethod()
getMethod in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic org.apache.olingo.client.api.communication.header.ODataHeaders getHeader()
public byte[] toByteArray()
toByteArray in interface org.apache.olingo.client.api.communication.request.ODataRequestpublic InputStream rawExecute()
rawExecute in interface org.apache.olingo.client.api.communication.request.ODataRequestprotected org.apache.http.HttpResponse doExecute()
public <V extends org.apache.olingo.client.api.communication.response.ODataResponse> V getResponseTemplate()
V - ODataResponse type.Copyright © 2013–2017 The Apache Software Foundation. All rights reserved.