|
||||||||||
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(Logger logger)
|
Method Summary | |
---|---|
boolean |
followRedirects()
This method returns true, override if you want different behaviour. |
Logger |
getLogger()
|
void |
handleFailure(HttpHeader request,
Exception e)
Logs an error to the logger and calls requestDone(). |
void |
handleResponse(HttpHeader request,
HttpHeader response,
WebConnection wc,
BufferHandle bufferHandle,
boolean keepalive,
boolean isChunked,
long dataSize)
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()
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(Logger logger)
Method Detail |
---|
public Logger getLogger()
public void redirected(HttpHeader request, String location, ClientBase base)
redirected
in interface ClientListener
request
- the request that was redirectedlocation
- the location the redirect givespublic void redirectedTo(String url) throws IOException
IOException
public void handleResponse(HttpHeader request, HttpHeader response, WebConnection wc, BufferHandle bufferHandle, boolean keepalive, boolean isChunked, long dataSize)
handleResponse
in interface ClientListener
request
- the request maderesponse
- the response headerbufferHandle
- the BufferHandle used, may contain resource datakeepalive
- a flag indicating if keepalive seems possible for
this connection.isChunked
- a flag to tell if the resource is chunked or notdataSize
- the size of the resource, may be -1 if unknownpublic boolean followRedirects()
followRedirects
in interface ClientListener
public void handleTimeout(HttpHeader request)
handleTimeout
in interface ClientListener
public void handleFailure(HttpHeader request, Exception e)
handleFailure
in interface ClientListener
public void requestDone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |