|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object retrofit.RestAdapter.Builder
public static class RestAdapter.Builder
Build a new RestAdapter
.
Calling the following methods is required before calling build()
:
If you are using asynchronous execution (i.e., with Callbacks
) the following
is also required:
Constructor Summary | |
---|---|
RestAdapter.Builder()
|
Method Summary | |
---|---|
RestAdapter |
build()
Create the RestAdapter instances. |
RestAdapter.Builder |
setClient(Client.Provider clientProvider)
The HTTP client used for requests. |
RestAdapter.Builder |
setClient(Client client)
The HTTP client used for requests. |
RestAdapter.Builder |
setConverter(Converter converter)
The converter used for serialization and deserialization of objects. |
RestAdapter.Builder |
setDebug(boolean debug)
Enable debug logging. |
RestAdapter.Builder |
setErrorHandler(ErrorHandler errorHandler)
The error handler allows you to customize the type of exception thrown for errors on synchronous requests. |
RestAdapter.Builder |
setExecutors(Executor httpExecutor,
Executor callbackExecutor)
Executors used for asynchronous HTTP client downloads and callbacks. |
RestAdapter.Builder |
setLog(RestAdapter.Log log)
Configure debug logging mechanism. |
RestAdapter.Builder |
setProfiler(Profiler profiler)
Set the profiler used to measure requests. |
RestAdapter.Builder |
setRequestInterceptor(RequestInterceptor requestInterceptor)
A request interceptor for adding data to every request. |
RestAdapter.Builder |
setServer(Server server)
API server. |
RestAdapter.Builder |
setServer(String endpoint)
API server base URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RestAdapter.Builder()
Method Detail |
---|
public RestAdapter.Builder setServer(String endpoint)
public RestAdapter.Builder setServer(Server server)
public RestAdapter.Builder setClient(Client client)
public RestAdapter.Builder setClient(Client.Provider clientProvider)
public RestAdapter.Builder setExecutors(Executor httpExecutor, Executor callbackExecutor)
httpExecutor
- Executor on which HTTP client calls will be made.callbackExecutor
- Executor on which any Callback
methods will be invoked. If
this argument is null
then callback methods will be run on the same thread as the
HTTP client.public RestAdapter.Builder setRequestInterceptor(RequestInterceptor requestInterceptor)
public RestAdapter.Builder setConverter(Converter converter)
public RestAdapter.Builder setProfiler(Profiler profiler)
public RestAdapter.Builder setErrorHandler(ErrorHandler errorHandler)
public RestAdapter.Builder setLog(RestAdapter.Log log)
public RestAdapter.Builder setDebug(boolean debug)
public RestAdapter build()
RestAdapter
instances.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |