Class UrlPrefixDecorator<R extends org.apache.flink.runtime.rest.messages.RequestBody,P extends org.apache.flink.runtime.rest.messages.ResponseBody,M extends org.apache.flink.runtime.rest.messages.MessageParameters>
java.lang.Object
org.apache.flink.client.program.rest.UrlPrefixDecorator<R,P,M>
- Type Parameters:
R- the type of the request bodyP- the type of the response bodyM- the type of the message parameters
- All Implemented Interfaces:
org.apache.flink.runtime.rest.handler.RestHandlerSpecification,org.apache.flink.runtime.rest.messages.MessageHeaders<R,,P, M> org.apache.flink.runtime.rest.messages.UntypedResponseMessageHeaders<R,M>
public class UrlPrefixDecorator<R extends org.apache.flink.runtime.rest.messages.RequestBody,P extends org.apache.flink.runtime.rest.messages.ResponseBody,M extends org.apache.flink.runtime.rest.messages.MessageParameters>
extends Object
implements org.apache.flink.runtime.rest.messages.MessageHeaders<R,P,M>
This class decorates the URL of the original message headers by adding a prefix. The purpose of
this decorator is to provide a consistent URL prefix for all the REST API endpoints while
preserving the behavior of the original message headers.
-
Constructor Summary
ConstructorsConstructorDescriptionUrlPrefixDecorator(org.apache.flink.runtime.rest.messages.MessageHeaders<R, P, M> messageHeaders, String urlPrefix) Constructs an instance of UrlPrefixDecorator. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.runtime.rest.HttpMethodWrapperorg.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatusCollection<Class<?>>Collection<? extends org.apache.flink.runtime.rest.versioning.RestAPIVersion<?>>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.rest.messages.MessageHeaders
getCustomHeaders, operationIdMethods inherited from interface org.apache.flink.runtime.rest.messages.UntypedResponseMessageHeaders
acceptsFileUploads
-
Constructor Details
-
UrlPrefixDecorator
public UrlPrefixDecorator(org.apache.flink.runtime.rest.messages.MessageHeaders<R, P, M> messageHeaders, String urlPrefix) Constructs an instance of UrlPrefixDecorator.- Parameters:
messageHeaders- the original SqlGatewayMessageHeaders to be decoratedurlPrefix- the URL prefix to be added to the target REST endpoint URL
-
-
Method Details
-
getHttpMethod
public org.apache.flink.runtime.rest.HttpMethodWrapper getHttpMethod()- Specified by:
getHttpMethodin interfaceorg.apache.flink.runtime.rest.handler.RestHandlerSpecification
-
getTargetRestEndpointURL
- Specified by:
getTargetRestEndpointURLin interfaceorg.apache.flink.runtime.rest.handler.RestHandlerSpecification
-
getResponseClass
-
getResponseStatusCode
public org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus getResponseStatusCode() -
getDescription
-
getRequestClass
-
getUnresolvedMessageParameters
-
getSupportedAPIVersions
public Collection<? extends org.apache.flink.runtime.rest.versioning.RestAPIVersion<?>> getSupportedAPIVersions()- Specified by:
getSupportedAPIVersionsin interfaceorg.apache.flink.runtime.rest.handler.RestHandlerSpecification
-
getResponseTypeParameters
-
getDecorated
-