org.codegist.crest.interceptor
Class CompositeRequestInterceptor

java.lang.Object
  extended by org.codegist.crest.interceptor.CompositeRequestInterceptor
All Implemented Interfaces:
RequestInterceptor

public class CompositeRequestInterceptor
extends Object
implements RequestInterceptor

Simple composite request interceptor that delegate notifications to a predefined list of interceptors.

Author:
Laurent Gilles (laurent.gilles@codegist.org)

Constructor Summary
CompositeRequestInterceptor(RequestInterceptor... interceptors)
           
 
Method Summary
 void afterParamsInjectionHandle(HttpRequest.Builder builder, RequestContext context)
          Called after parameters have been injected into the request.
 void beforeParamsInjectionHandle(HttpRequest.Builder builder, RequestContext context)
          Called after general parameter have been added to the request, but before parameters are injected into it.
 RequestInterceptor[] getInterceptors()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeRequestInterceptor

public CompositeRequestInterceptor(RequestInterceptor... interceptors)
Method Detail

beforeParamsInjectionHandle

public void beforeParamsInjectionHandle(HttpRequest.Builder builder,
                                        RequestContext context)
                                 throws Exception
Description copied from interface: RequestInterceptor
Called after general parameter have been added to the request, but before parameters are injected into it.

Specified by:
beforeParamsInjectionHandle in interface RequestInterceptor
Parameters:
builder - The current http request being build
context - The current request context
Throws:
Exception

afterParamsInjectionHandle

public void afterParamsInjectionHandle(HttpRequest.Builder builder,
                                       RequestContext context)
                                throws Exception
Description copied from interface: RequestInterceptor
Called after parameters have been injected into the request.

Specified by:
afterParamsInjectionHandle in interface RequestInterceptor
Parameters:
builder - The current http request being build
context - The current request context
Throws:
Exception

getInterceptors

public RequestInterceptor[] getInterceptors()


Copyright © 2011. All Rights Reserved.