public class ApiComposer
extends java.lang.Object
PCloudAPIClient
,
ResponseInterceptor
Modifier and Type | Class and Description |
---|---|
static class |
ApiComposer.Builder
A builder to build instances of ApiComposer
|
Modifier and Type | Method and Description |
---|---|
PCloudAPIClient |
apiClient()
Returns the PCloudAPIClient you provided in the ApiComposer.Builder
|
<T> T |
compose(java.lang.Class<T> apiType)
Composes an instance of the java interface which houses the network call methods
|
static ApiComposer.Builder |
create()
Creates and returns a ApiComposer.Builder to build the ApiComposer with
|
java.util.List<ResponseInterceptor> |
interceptors()
Returns a List of all the ResponseInterceptor
objects you provided in the ApiComposer.Builder
|
ApiComposer.Builder |
newBuilder()
Returns a new instance of a ApiComposer.Builder to build a new ApiComposer
|
Transformer |
transformer()
Returns the Transformer you provided in the ApiComposer.Builder
|
public static ApiComposer.Builder create()
public Transformer transformer()
public PCloudAPIClient apiClient()
public java.util.List<ResponseInterceptor> interceptors()
public <T> T compose(java.lang.Class<T> apiType)
Note that you should provide an interface which does not extend anything or else this wont work!
T
- The generic type of the returned instanceapiType
- The class of the java interface in which you have
written the methods to represent the network callsjava.lang.RuntimeException
- if loadEagerly is set to true and if the instantiation failspublic ApiComposer.Builder newBuilder()