org.codegist.crest.interceptor
Interface RequestInterceptor

All Known Implementing Classes:
AuthentificationInterceptor, CompositeRequestInterceptor, EmptyRequestInterceptor, RequestInterceptorAdapter

public interface RequestInterceptor

Interceptors are notified before and after the parameters have been added to the request.

They can be used to cancel a request from being fired by returning false, or arbitrary modify the request.

If implementor declares a constructor with a Map argument, it will be called with the user custom properties.

Author:
Laurent Gilles (laurent.gilles@codegist.org)
See Also:
InterfaceContext.getProperties()

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.
 

Method Detail

beforeParamsInjectionHandle

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

Parameters:
builder - The current http request being build
context - The current request context
Throws:
Exception

afterParamsInjectionHandle

void afterParamsInjectionHandle(HttpRequest.Builder builder,
                                RequestContext context)
                                throws Exception
Called after parameters have been injected into the request.

Parameters:
builder - The current http request being build
context - The current request context
Throws:
Exception


Copyright © 2011. All Rights Reserved.