ClientListenerAdapter (RabbIT/4)
Date: 2009-10-13

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.client
Class ClientListenerAdapter

    java.lang.Object
      rabbit.client.ClientListenerAdapter

All Implemented Interfaces:
  ClientListener

    public class ClientListenerAdapter

extends Object
implements ClientListener

A basic ClientListener.

Author:
  Robert Olofsson

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

### ClientListenerAdapter

    public ClientListenerAdapter()

Method Detail

### redirected

    public void redirected(HttpHeader request,
                           String location,
                           ClientBase base)

  Create the redirected url and calls redirectedTo() and requestDone().

  Specified by:
    `redirected` in interface `ClientListener`
  Parameters:
    `request` - the request that was redirected
    `location` - the location the redirect gives

### redirectedTo

    public void redirectedTo(String url)
                      throws IOException

  This method does nothing, override to perform actual request.

  Throws:
    `IOException`

### handleResponse

    public void handleResponse(HttpHeader request,
                               HttpHeader response,
                               WebConnectionResourceSource wc)

  This method does nothing.

  Specified by:
    `handleResponse` in interface `ClientListener`
  Parameters:
    `request` - the request made
    `response` - the response header
    `wc` - the actual resource

### followRedirects

    public boolean followRedirects()

  This method returns true, override if you want different behaviour.

  Specified by:
    `followRedirects` in interface `ClientListener`

### handleTimeout

    public void handleTimeout(HttpHeader request)

  Logs an error to the logger and calls requestDone().

  Specified by:
    `handleTimeout` in interface `ClientListener`

### handleFailure

    public void handleFailure(HttpHeader request,
                              Exception e)

  Logs an error to the logger and calls requestDone().

  Specified by:
    `handleFailure` in interface `ClientListener`

### requestDone

    public void requestDone(HttpHeader request)

  Handle any cleanup in this method.

  Specified by:
    `requestDone` in interface `ClientListener`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD