Package com.azure.android.core.rest
Class RestProxy
- java.lang.Object
-
- com.azure.android.core.rest.RestProxy
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
public final class RestProxy extends java.lang.Object implements java.lang.reflect.InvocationHandlerType to create a proxy implementation for an interface describing REST API methods. RestProxy can create proxy implementations for interfaces with methods that produces deserialized Java objects.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A> Acreate(java.lang.Class<A> swaggerInterface, com.azure.android.core.http.HttpPipeline httpPipeline, com.azure.android.core.serde.jackson.JacksonSerder jacksonSerder)Create a proxy implementation of the provided Swagger interface.java.lang.Objectinvoke(java.lang.Object restProxy, java.lang.reflect.Method swaggerMethod, java.lang.Object[] swaggerMethodArgs)
-
-
-
Method Detail
-
create
public static <A> A create(java.lang.Class<A> swaggerInterface, com.azure.android.core.http.HttpPipeline httpPipeline, com.azure.android.core.serde.jackson.JacksonSerder jacksonSerder)Create a proxy implementation of the provided Swagger interface.- Type Parameters:
A- the type of the Swagger interface.- Parameters:
swaggerInterface- the Swagger interface to provide a proxy implementation for.httpPipeline- the HttpPipelinePolicy and HttpClient pipeline that will be used to send Http requests.jacksonSerder- the serializer that will be used to convert POJOs to and from request and response bodies- Returns:
- a proxy implementation of the provided Swagger interface.
-
invoke
public java.lang.Object invoke(java.lang.Object restProxy, java.lang.reflect.Method swaggerMethod, java.lang.Object[] swaggerMethodArgs)- Specified by:
invokein interfacejava.lang.reflect.InvocationHandler
-
-