azure-docs-sdk-java/docs-ref-autogen/com.azure.core.http.rest.Re...

120 строки
9.3 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.core.http.rest.RestProxy"
fullName: "com.azure.core.http.rest.RestProxy"
name: "RestProxy"
nameWithType: "RestProxy"
summary: "RestProxy is a type that creates a proxy implementation for an interface describing REST API methods."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **RestProxy**</br> implements <a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/InvocationHandler.html\">InvocationHandler</a>"
methods:
- uid: "com.azure.core.http.rest.RestProxy.<A>create(java.lang.Class<A>)"
fullName: "com.azure.core.http.rest.RestProxy.create(Class<A> swaggerInterface)"
name: "create(Class<A> swaggerInterface)"
nameWithType: "RestProxy.create(Class<A> swaggerInterface)"
summary: "Create a proxy implementation of the provided Swagger interface."
modifiers:
- "static"
parameters:
- description: "the Swagger interface to provide a proxy implementation for"
name: "swaggerInterface"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a>&lt;<xref href=\"A?alt=A&text=A\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public static A <A>create(Class<A> swaggerInterface)"
desc: "Create a proxy implementation of the provided Swagger interface."
returns:
description: "a proxy implementation of the provided Swagger interface"
type: "<xref href=\"A?alt=A&text=A\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.rest.RestProxy.<A>create(java.lang.Class<A>,com.azure.core.http.HttpPipeline)"
fullName: "com.azure.core.http.rest.RestProxy.create(Class<A> swaggerInterface, HttpPipeline httpPipeline)"
name: "create(Class<A> swaggerInterface, HttpPipeline httpPipeline)"
nameWithType: "RestProxy.create(Class<A> swaggerInterface, HttpPipeline httpPipeline)"
summary: "Create a proxy implementation of the provided Swagger interface."
modifiers:
- "static"
parameters:
- description: "the Swagger interface to provide a proxy implementation for"
name: "swaggerInterface"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a>&lt;<xref href=\"A?alt=A&text=A\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "the HttpPipelinePolicy and HttpClient pipeline that will be used to send Http requests"
name: "httpPipeline"
type: "<xref href=\"com.azure.core.http.HttpPipeline?alt=com.azure.core.http.HttpPipeline&text=HttpPipeline\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static A <A>create(Class<A> swaggerInterface, HttpPipeline httpPipeline)"
desc: "Create a proxy implementation of the provided Swagger interface."
returns:
description: "a proxy implementation of the provided Swagger interface"
type: "<xref href=\"A?alt=A&text=A\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.rest.RestProxy.<A>create(java.lang.Class<A>,com.azure.core.http.HttpPipeline,com.azure.core.util.serializer.SerializerAdapter)"
fullName: "com.azure.core.http.rest.RestProxy.create(Class<A> swaggerInterface, HttpPipeline httpPipeline, SerializerAdapter serializer)"
name: "create(Class<A> swaggerInterface, HttpPipeline httpPipeline, SerializerAdapter serializer)"
nameWithType: "RestProxy.create(Class<A> swaggerInterface, HttpPipeline httpPipeline, SerializerAdapter serializer)"
summary: "Create a proxy implementation of the provided Swagger interface."
modifiers:
- "static"
parameters:
- description: "the Swagger interface to provide a proxy implementation for"
name: "swaggerInterface"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a>&lt;<xref href=\"A?alt=A&text=A\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "the HttpPipelinePolicy and HttpClient pipline that will be used to send Http requests"
name: "httpPipeline"
type: "<xref href=\"com.azure.core.http.HttpPipeline?alt=com.azure.core.http.HttpPipeline&text=HttpPipeline\" data-throw-if-not-resolved=\"False\" />"
- description: "the serializer that will be used to convert POJOs to and from request and response bodies"
name: "serializer"
type: "<xref href=\"com.azure.core.util.serializer.SerializerAdapter?alt=com.azure.core.util.serializer.SerializerAdapter&text=SerializerAdapter\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static A <A>create(Class<A> swaggerInterface, HttpPipeline httpPipeline, SerializerAdapter serializer)"
desc: "Create a proxy implementation of the provided Swagger interface."
returns:
description: "a proxy implementation of the provided Swagger interface"
type: "<xref href=\"A?alt=A&text=A\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.rest.RestProxy.invoke(java.lang.Object,java.lang.reflect.Method,java.lang.Object[])"
fullName: "com.azure.core.http.rest.RestProxy.invoke(Object proxy, Method method, Object[] args)"
name: "invoke(Object proxy, Method method, Object[] args)"
nameWithType: "RestProxy.invoke(Object proxy, Method method, Object[] args)"
parameters:
- name: "proxy"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
- name: "method"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html\">Method</a>"
- name: "args"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>[]"
syntax: "public Object invoke(Object proxy, Method method, Object[] args)"
returns:
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
- uid: "com.azure.core.http.rest.RestProxy.send(com.azure.core.http.HttpRequest,com.azure.core.util.Context)"
fullName: "com.azure.core.http.rest.RestProxy.send(HttpRequest request, Context contextData)"
name: "send(HttpRequest request, Context contextData)"
nameWithType: "RestProxy.send(HttpRequest request, Context contextData)"
summary: "Send the provided request asynchronously, applying any request policies provided to the Http<wbr>Client instance."
parameters:
- description: "the HTTP request to send"
name: "request"
type: "<xref href=\"com.azure.core.http.HttpRequest?alt=com.azure.core.http.HttpRequest&text=HttpRequest\" data-throw-if-not-resolved=\"False\" />"
- description: "the context"
name: "contextData"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<HttpResponse> send(HttpRequest request, Context contextData)"
desc: "Send the provided request asynchronously, applying any request policies provided to the HttpClient instance."
returns:
description: "a <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> that emits HttpResponse asynchronously"
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a>&lt;<xref href=\"com.azure.core.http.HttpResponse?alt=com.azure.core.http.HttpResponse&text=HttpResponse\" data-throw-if-not-resolved=\"False\" />&gt;"
type: "class"
desc: "RestProxy is a type that creates a proxy implementation for an interface describing REST API methods. It can create proxy implementations for interfaces with methods that return deserialized Java objects as well as asynchronous Single objects that resolve to a deserialized Java object.\n\nRestProxy uses the provided HttpPipeline and SerializerAdapter to send HTTP requests and convert response bodies to POJOs.\n\nIt also provides methods to send the provided request asynchronously, applying any request policies provided to the HttpClient instance.\n\nRestProxy is useful when you want to create a proxy implementation for an interface describing REST API methods."
implements:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/InvocationHandler.html\">InvocationHandler</a>"
metadata: {}
package: "com.azure.core.http.rest"
artifact: com.azure:azure-core:1.52.0