com.noelios.restlet.http
Class HttpClientHelper

java.lang.Object
  extended by org.restlet.util.Helper<T>
      extended by com.noelios.restlet.ConnectorHelper<Client>
          extended by com.noelios.restlet.ClientHelper
              extended by com.noelios.restlet.http.HttpClientHelper
Direct Known Subclasses:
StreamClientHelper

public abstract class HttpClientHelper
extends ClientHelper

Base HTTP client connector. Here is the list of parameters that are supported:

Parameter name Value type Default value Description
converter String com.noelios.restlet.http.HttpClientConverter Class name of the converter of low-level HTTP calls into high level requests and responses.

Author:
Jerome Louvel

Constructor Summary
HttpClientHelper(Client client)
          Constructor.
 
Method Summary
abstract  HttpClientCall create(Request request)
          Creates a low-level HTTP client call from a high-level request.
 HttpClientConverter getConverter()
          Returns the converter from uniform calls to HTTP calls.
 void handle(Request request, Response response)
           
 void setConverter(HttpClientConverter converter)
          Sets the converter from uniform calls to HTTP calls.
 
Methods inherited from class com.noelios.restlet.ClientHelper
getConnectTimeout
 
Methods inherited from class com.noelios.restlet.ConnectorHelper
getProtocols, start, stop, update
 
Methods inherited from class org.restlet.util.Helper
getAttributes, getContext, getHelped, getHelpedParameters, getLogger, setHelped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientHelper

public HttpClientHelper(Client client)
Constructor.

Parameters:
client - The client to help.
Method Detail

create

public abstract HttpClientCall create(Request request)
Creates a low-level HTTP client call from a high-level request.

Parameters:
request - The high-level request.
Returns:
A low-level HTTP client call.

getConverter

public HttpClientConverter getConverter()
                                 throws java.lang.Exception
Returns the converter from uniform calls to HTTP calls.

Returns:
the converter from uniform calls to HTTP calls.
Throws:
java.lang.Exception

handle

public void handle(Request request,
                   Response response)
Overrides:
handle in class Helper<Client>

setConverter

public void setConverter(HttpClientConverter converter)
Sets the converter from uniform calls to HTTP calls.

Parameters:
converter - The converter to set.


Copyright © 2005-2008 Noelios Technologies.