public interface ExchangeHint
Modifier and Type | Method and Description |
---|---|
Object |
getCacheKey()
Return a cache key of this hint.
|
String |
getMethodName()
Return method name hint.
|
Object |
getRequest()
Deprecated.
Use
getRequestHeaders() and getRequestBody() instead. |
Object |
getRequestBody()
Return request body.
|
Map<String,List<String>> |
getRequestHeaders()
Return request headers map.
|
Object |
getResponseBody()
Return response body.
|
Map<String,List<String>> |
getResponseHeaders()
Return response headers map.
|
int |
getResponseStatusCode()
Return response status code.
|
boolean |
isNoCache()
Return true if the underlying
ResourceResolver should disallow caching. |
void |
setNoCache(boolean noCache)
Set flag whether or not the underlying
ResourceResolver should disallow caching. |
void |
setResponseBody(Object responseBody)
Set response body.
|
void |
setResponseHeaders(Map<String,List<String>> responseHeaders)
Set response headers map.
|
void |
setResponseStatusCode(int responseStatusCode)
Set response status code.
|
String getMethodName()
@Deprecated Object getRequest()
getRequestHeaders()
and getRequestBody()
instead.ResourceResolver
implementation.ResourceResolver
implementationMap<String,List<String>> getRequestHeaders()
Object getRequestBody()
Object getCacheKey()
int getResponseStatusCode()
void setResponseStatusCode(int responseStatusCode)
responseStatusCode
- response status codeMap<String,List<String>> getResponseHeaders()
void setResponseHeaders(Map<String,List<String>> responseHeaders)
responseHeaders
- response headers mapObject getResponseBody()
ResourceResolver
doesn't set it.
The type of response body depends on the underlying ResourceResolver
implementation.
It could be a Resource
object (mostly likely when the backend produces the same content type for
both normal response and error response), byte[] or String, for example.
Note: This method can be used mostly when the underlying ResourceResolver
throws an exception
instead of returning a result.
void setResponseBody(Object responseBody)
ResourceResolver
implementation.
It could be a Resource
object (mostly likely when the backend produces the same content type for
both normal response and error response), byte[] or String, for example.
Note: This method can be used by the underlying ResourceResolver
when a call on the backend
returns an error, instead of a normal result.
responseBody
- response bodyboolean isNoCache()
ResourceResolver
should disallow caching.ResourceResolver
should disallow cachingvoid setNoCache(boolean noCache)
ResourceResolver
should disallow caching.noCache
- flag whether or not the underlying ResourceResolver
should disallow cachingCopyright © 2017–2020 Hippo B.V. (http://www.onehippo.com). All rights reserved.