com.bumptech.glide.load.model
Class LazyHeaders.Builder

java.lang.Object
  extended by com.bumptech.glide.load.model.LazyHeaders.Builder
Enclosing class:
LazyHeaders

public static final class LazyHeaders.Builder
extends Object

Builder class for LazyHeaders.

This class is not thread safe.


Constructor Summary
LazyHeaders.Builder()
           
 
Method Summary
 LazyHeaders.Builder addHeader(String key, LazyHeaderFactory factory)
          Adds an LazyHeaderFactory that will be used to construct a value for the given key lazily on a background thread.
 LazyHeaders.Builder addHeader(String key, String value)
          Adds a value for the given header and returns this builder.
 LazyHeaders build()
          Returns a new immutable LazyHeaders object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyHeaders.Builder

public LazyHeaders.Builder()
Method Detail

addHeader

public LazyHeaders.Builder addHeader(String key,
                                     String value)
Adds a value for the given header and returns this builder.

Use addHeader(String, LazyHeaderFactory) if obtaining the value requires I/O (ie an oauth token).

See Also:
addHeader(String, LazyHeaderFactory)

addHeader

public LazyHeaders.Builder addHeader(String key,
                                     LazyHeaderFactory factory)
Adds an LazyHeaderFactory that will be used to construct a value for the given key lazily on a background thread.

Headers may have multiple values whose order is defined by the order in which this method is called.

This class does not prevent you from adding the same value to a given key multiple times


build

public LazyHeaders build()
Returns a new immutable LazyHeaders object.