public final class RestProxy extends Object implements InvocationHandler
| Modifier and Type | Method and Description |
|---|---|
static <A> A |
create(Class<A> swaggerInterface)
Create a proxy implementation of the provided Swagger interface.
|
static <A> A |
create(Class<A> swaggerInterface,
HttpPipeline httpPipeline)
Create a proxy implementation of the provided Swagger interface.
|
static <A> A |
create(Class<A> swaggerInterface,
HttpPipeline httpPipeline,
SerializerAdapter serializer)
Create a proxy implementation of the provided Swagger interface.
|
Object |
invoke(Object proxy,
Method method,
Object[] args) |
Mono<HttpResponse> |
send(HttpRequest request,
Context contextData)
Send the provided request asynchronously, applying any request policies provided to the HttpClient instance.
|
public Mono<HttpResponse> send(HttpRequest request, Context contextData)
request - the HTTP request to sendcontextData - the contextMono that emits HttpResponse asynchronouslypublic Object invoke(Object proxy, Method method, Object[] args)
invoke in interface InvocationHandlerpublic static <A> A create(Class<A> swaggerInterface)
A - the type of the Swagger interfaceswaggerInterface - the Swagger interface to provide a proxy implementation forpublic static <A> A create(Class<A> swaggerInterface, HttpPipeline httpPipeline)
A - the type of the Swagger interfaceswaggerInterface - the Swagger interface to provide a proxy implementation forhttpPipeline - the HttpPipelinePolicy and HttpClient pipeline that will be used to send Http requestspublic static <A> A create(Class<A> swaggerInterface, HttpPipeline httpPipeline, SerializerAdapter serializer)
A - the type of the Swagger interface.swaggerInterface - the Swagger interface to provide a proxy implementation forhttpPipeline - the HttpPipelinePolicy and HttpClient pipline that will be used to send Http requestsserializer - the serializer that will be used to convert POJOs to and from request and response bodiesCopyright © 2020 Microsoft Corporation. All rights reserved.