public class CustomHeadersDecorator<R extends RequestBody,P extends ResponseBody,M extends MessageParameters> extends Object implements MessageHeaders<R,P,M>
MessageHeaders that adds the ability to include custom HTTP headers.| 构造器和说明 |
|---|
CustomHeadersDecorator(MessageHeaders<R,P,M> decorated)
Creates a new
CustomHeadersDecorator for a given MessageHeaders object. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCustomHeader(HttpHeader httpHeader)
Adds a custom header to the message.
|
Collection<HttpHeader> |
getCustomHeaders()
Returns the custom headers added to the message.
|
MessageHeaders<R,P,M> |
getDecorated() |
String |
getDescription()
Returns the description for this header.
|
HttpMethodWrapper |
getHttpMethod()
Returns the
HttpMethodWrapper to be used for the request. |
Class<R> |
getRequestClass()
Returns the class of the request message.
|
Class<P> |
getResponseClass()
Returns the class of the response message.
|
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus |
getResponseStatusCode()
Returns the http status code for the response.
|
Collection<Class<?>> |
getResponseTypeParameters()
Returns the collection of type parameters for the response type.
|
Collection<? extends RestAPIVersion<?>> |
getSupportedAPIVersions()
Returns the supported API versions that this request supports.
|
String |
getTargetRestEndpointURL()
Returns the generalized endpoint url that this request should be sent to, for example
/job/:jobid. |
M |
getUnresolvedMessageParameters()
Returns a new
MessageParameters object. |
void |
setCustomHeaders(Collection<HttpHeader> customHeaders)
Sets the custom headers for the message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitoperationIdacceptsFileUploadspublic CustomHeadersDecorator(MessageHeaders<R,P,M> decorated)
CustomHeadersDecorator for a given MessageHeaders object.decorated - The MessageHeaders to decorate.public HttpMethodWrapper getHttpMethod()
RestHandlerSpecificationHttpMethodWrapper to be used for the request.getHttpMethod 在接口中 RestHandlerSpecificationpublic String getTargetRestEndpointURL()
RestHandlerSpecification/job/:jobid.getTargetRestEndpointURL 在接口中 RestHandlerSpecificationpublic Collection<? extends RestAPIVersion<?>> getSupportedAPIVersions()
RestHandlerSpecificationgetSupportedAPIVersions 在接口中 RestHandlerSpecificationpublic Class<P> getResponseClass()
MessageHeadersgetResponseClass 在接口中 MessageHeaders<R extends RequestBody,P extends ResponseBody,M extends MessageParameters>public org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus getResponseStatusCode()
MessageHeadersgetResponseStatusCode 在接口中 MessageHeaders<R extends RequestBody,P extends ResponseBody,M extends MessageParameters>public String getDescription()
MessageHeadersgetDescription 在接口中 MessageHeaders<R extends RequestBody,P extends ResponseBody,M extends MessageParameters>public Class<R> getRequestClass()
UntypedResponseMessageHeadersgetRequestClass 在接口中 UntypedResponseMessageHeaders<R extends RequestBody,M extends MessageParameters>public M getUnresolvedMessageParameters()
UntypedResponseMessageHeadersMessageParameters object.getUnresolvedMessageParameters 在接口中 UntypedResponseMessageHeaders<R extends RequestBody,M extends MessageParameters>public Collection<HttpHeader> getCustomHeaders()
getCustomHeaders 在接口中 MessageHeaders<R extends RequestBody,P extends ResponseBody,M extends MessageParameters>HttpHeader.public Collection<Class<?>> getResponseTypeParameters()
MessageHeadersgetResponseTypeParameters 在接口中 MessageHeaders<R extends RequestBody,P extends ResponseBody,M extends MessageParameters>public void setCustomHeaders(Collection<HttpHeader> customHeaders)
customHeaders - A collection of custom headers.public void addCustomHeader(HttpHeader httpHeader)
httpHeader - The header to add.public MessageHeaders<R,P,M> getDecorated()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.