org.codegist.crest.io.http
Class AuthorizationHttpChannelFactory

java.lang.Object
  extended by org.codegist.crest.io.http.AuthorizationHttpChannelFactory
All Implemented Interfaces:
HttpChannelFactory

public class AuthorizationHttpChannelFactory
extends Object
implements HttpChannelFactory

Author:
laurent.gilles@codegist.org

Constructor Summary
AuthorizationHttpChannelFactory(HttpChannelFactory delegate, Authorization authorization, Map<String,EntityParamExtractor> entityParamExtrators)
           
 
Method Summary
 HttpChannel open(MethodType methodType, String url, Charset charset)
          Opens a new HTTP Channel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationHttpChannelFactory

public AuthorizationHttpChannelFactory(HttpChannelFactory delegate,
                                       Authorization authorization,
                                       Map<String,EntityParamExtractor> entityParamExtrators)
Parameters:
delegate - The HttpChannel to delegate the calls to
authorization - the authorization to use to authenticate based on the request parameters
entityParamExtrators - the entity's parameter extractors to use to extract any relevant parameter to use for authenticate the request
Method Detail

open

public HttpChannel open(MethodType methodType,
                        String url,
                        Charset charset)
                 throws IOException
Description copied from interface: HttpChannelFactory
Opens a new HTTP Channel

Specified by:
open in interface HttpChannelFactory
Parameters:
methodType - the HTTP method type of the HTTP channel
url - the URL to point the HTTP channel to
charset - the charset used to write to the HTTP channel
Returns:
a new HTTP Channel
Throws:
IOException


Copyright © 2011. All Rights Reserved.