public static class ApiComposer.Builder
extends java.lang.Object
public ApiComposer.Builder apiClient(PCloudAPIClient apiClient)
apiClient
- The PCloudAPIClient to be set to the ApiComposerjava.lang.IllegalArgumentException
- on a null PCloudAPIClient argumentpublic ApiComposer.Builder transformer(Transformer transformer)
transformer
- The Transformer to be set to the ApiComposerjava.lang.IllegalArgumentException
- on a null Transformer argumentpublic ApiComposer.Builder addInterceptor(ResponseInterceptor interceptor)
interceptor
- The ResponseInterceptor to be set to the ApiComposerjava.lang.IllegalArgumentException
- on a null ResponseInterceptor argumentpublic ApiComposer.Builder removeInterceptor(ResponseInterceptor interceptor)
interceptor
- The ResponseInterceptor to be removed from the ApiComposer.Builderjava.lang.IllegalArgumentException
- on a null ResponseInterceptor argumentpublic ApiComposer.Builder removeInterceptors(java.util.Collection<ResponseInterceptor> interceptors)
Does the same thing as removeInterceptor(ResponseInterceptor) for each ResponseInterceptor in the Collection
interceptors
- A Collection of ResponseInterceptor
objects to be removed from the ApiComposer.Builderjava.lang.IllegalArgumentException
- on a null Collection argumentpublic ApiComposer.Builder addInterceptors(java.util.Collection<ResponseInterceptor> interceptors)
Does the same thing as addInterceptor(ResponseInterceptor) for each ResponseInterceptor in the Collection
interceptors
- A Collection of ResponseInterceptor
objects to be added to the ApiComposerpublic ApiComposer.Builder addAdapterFactory(CallAdapter.Factory adapterFactory)
adapterFactory
- The CallAdapter.Factory to be set to the ApiComposerjava.lang.IllegalArgumentException
- on a null CallAdapter.Factory argumentpublic ApiComposer.Builder addAdapterFactories(CallAdapter.Factory... adapterFactories)
Does the same thing as addAdapterFactory(CallAdapter.Factory) for each CallAdapter.Factory in the Collection
adapterFactories
- An array of CallAdapter.Factory
objects to be added to the ApiComposerpublic ApiComposer.Builder addAdapterFactories(java.lang.Iterable<CallAdapter.Factory> adapterFactories)
Does the same thing as addAdapterFactory(CallAdapter.Factory) for each CallAdapter.Factory in the Collection
adapterFactories
- A Collection of CallAdapter.Factory
objects to be added to the ApiComposerpublic ApiComposer.Builder loadEagerly(boolean loadEagerly)
If set to true
the ApiComposer created from this builder will initialize
all interface method implementations immediately after the ApiComposer.compose(Class) is called.
If set to false
the ApiComposer.compose(Class) will only
basic conditions for the supplied interface class and will actually resolve
the interface method implementations on-demand (when the methods are called for the first time).
loadEagerly
- the condition for whether the interface implementation should be lazy or eagerpublic ApiComposer create()