Skip navigation links
A C D F M N R S V 

A

applyBehavior(NetworkBehavior, Call<?>) - Method in class retrofit.mock.CallBehaviorAdapter
 
applyBehavior(NetworkBehavior, T) - Method in interface retrofit.mock.NetworkBehavior.Adapter
Apply behavior to value so that it exhibits the configured network behavior traits when interacted with.

C

calculateDelay(TimeUnit) - Method in class retrofit.mock.NetworkBehavior
Get the delay that should be used for delaying a response in accordance with configured behavior.
calculateIsFailure() - Method in class retrofit.mock.NetworkBehavior
Randomly determine whether this call should result in a network failure in accordance with configured behavior.
CallBehaviorAdapter - Class in retrofit.mock
 
CallBehaviorAdapter(Retrofit, ExecutorService) - Constructor for class retrofit.mock.CallBehaviorAdapter
Create an instance with a normal Retrofit instance and an executor service on which the simulated delays will be created.
Calls - Class in retrofit.mock
Factory methods for creating Call instances which immediately respond or fail.
create(Class<T>, T) - Method in class retrofit.mock.MockRetrofit
 
create() - Static method in class retrofit.mock.NetworkBehavior
Create an instance with default behavior.
create(Random) - Static method in class retrofit.mock.NetworkBehavior
Create an instance with default behavior which uses random to control variance and failure calculation.

D

delay(TimeUnit) - Method in class retrofit.mock.NetworkBehavior
The network round trip delay.

F

failure(IOException) - Static method in class retrofit.mock.Calls
 
failureException() - Method in class retrofit.mock.NetworkBehavior
The exception to be used when a failure is triggered.
failurePercent() - Method in class retrofit.mock.NetworkBehavior
The percentage of calls to NetworkBehavior.calculateIsFailure() that return true.

M

MockRetrofit - Class in retrofit.mock
 
MockRetrofit(NetworkBehavior, NetworkBehavior.Adapter<?>) - Constructor for class retrofit.mock.MockRetrofit
 

N

NetworkBehavior - Class in retrofit.mock
A simple emulation of the behavior of network calls.
NetworkBehavior.Adapter<T> - Interface in retrofit.mock
Applies NetworkBehavior to instances of T.

R

response(T, Retrofit) - Static method in class retrofit.mock.Calls
 
response(Response<T>, Retrofit) - Static method in class retrofit.mock.Calls
 
retrofit.mock - package retrofit.mock
 

S

setDelay(long, TimeUnit) - Method in class retrofit.mock.NetworkBehavior
Set the network round trip delay.
setFailureException(Throwable) - Method in class retrofit.mock.NetworkBehavior
Set the exception to be used when a failure is triggered.
setFailurePercent(int) - Method in class retrofit.mock.NetworkBehavior
Set the percentage of calls to NetworkBehavior.calculateIsFailure() that return true.
setVariancePercent(int) - Method in class retrofit.mock.NetworkBehavior
Set the plus-or-minus variance percentage of the network round trip delay.

V

variancePercent() - Method in class retrofit.mock.NetworkBehavior
The plus-or-minus variance percentage of the network round trip delay.
A C D F M N R S V 
Skip navigation links

Copyright © 2015 Square, Inc.. All Rights Reserved.