|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.client.ClientListenerAdapter
public class ClientListenerAdapter
A basic ClientListener.
Constructor Summary | |
---|---|
ClientListenerAdapter()
|
Method Summary | |
---|---|
boolean |
followRedirects()
This method returns true, override if you want different behaviour. |
void |
handleFailure(HttpHeader request,
Exception e)
Logs an error to the logger and calls requestDone(). |
void |
handleResponse(HttpHeader request,
HttpHeader response,
WebConnectionResourceSource wc)
This method does nothing. |
void |
handleTimeout(HttpHeader request)
Logs an error to the logger and calls requestDone(). |
void |
redirected(HttpHeader request,
String location,
ClientBase base)
Create the redirected url and calls redirectedTo() and requestDone(). |
void |
redirectedTo(String url)
This method does nothing, override to perform actual request. |
void |
requestDone(HttpHeader request)
Handle any cleanup in this method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientListenerAdapter()
Method Detail |
---|
public void redirected(HttpHeader request, String location, ClientBase base)
redirected
in interface ClientListener
request
- the request that was redirectedlocation
- the location the redirect givesbase
- the actual clientpublic void redirectedTo(String url) throws IOException
url
- the new URL that the redirect header contained
IOException
- if redirecting failspublic void handleResponse(HttpHeader request, HttpHeader response, WebConnectionResourceSource wc)
handleResponse
in interface ClientListener
request
- the request maderesponse
- the response headerwc
- the actual resourcepublic boolean followRedirects()
followRedirects
in interface ClientListener
public void handleTimeout(HttpHeader request)
handleTimeout
in interface ClientListener
request
- the request that had a timeoutpublic void handleFailure(HttpHeader request, Exception e)
handleFailure
in interface ClientListener
request
- the request that failede
- the actual exception that occurredpublic void requestDone(HttpHeader request)
requestDone
in interface ClientListener
request
- the request that has been fully handled
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |