org.apache.http.params
public final class: DefaultedHttpParams [javadoc |
source]
java.lang.Object
org.apache.http.params.AbstractHttpParams
org.apache.http.params.DefaultedHttpParams
All Implemented Interfaces:
HttpParams
HttpParams implementation that delegates resolution of a parameter
to the given default
HttpParams instance if the parameter is not
present in the local one. The state of the local collection can be mutated,
whereas the default collection is treated as read-only.
- version:
$ - Revision: 744530 $
- since:
4.0 -
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.apache.http.params.DefaultedHttpParams Detail: |
public HttpParams copy() {
HttpParams clone = this.local.copy();
return new DefaultedHttpParams(clone, this.defaults);
}
Creates a copy of the local collection with the same default |
public HttpParams getDefaults() {
return this.defaults;
}
|
public Object getParameter(String name) {
Object obj = this.local.getParameter(name);
if (obj == null && this.defaults != null) {
obj = this.defaults.getParameter(name);
}
return obj;
}
Retrieves the value of the parameter from the local collection and, if the
parameter is not set locally, delegates its resolution to the default
collection. |
public boolean removeParameter(String name) {
return this.local.removeParameter(name);
}
Attempts to remove the parameter from the local collection. This method
does not modify the default collection. |
public HttpParams setParameter(String name,
Object value) {
return this.local.setParameter(name, value);
}
Sets the parameter in the local collection. This method does not
modify the default collection. |