Class ResponseProxyHandler
- java.lang.Object
-
- org.apache.http.impl.client.cache.ResponseProxyHandler
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
class ResponseProxyHandler extends java.lang.Object implements java.lang.reflect.InvocationHandler
A proxy class that can enhance an arbitraryHttpResponse
withCloseable.close()
method.- Since:
- 4.3
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.reflect.Method
CLOSE_METHOD
private org.apache.http.HttpResponse
original
-
Constructor Summary
Constructors Constructor Description ResponseProxyHandler(org.apache.http.HttpResponse original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.lang.Object
invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
- Specified by:
invoke
in interfacejava.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
-
-