com.noelios.restlet.http
Class HttpClientHelper

java.lang.Object
  extended by org.restlet.util.Helper
      extended by com.noelios.restlet.ConnectorHelper
          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 (contact@noelios.com)

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)
          Handles a call.
 void setConverter(HttpClientConverter converter)
          Sets the converter from uniform calls to HTTP calls.
 
Methods inherited from class com.noelios.restlet.ClientHelper
getClient, getContext, getLogger, getParameters
 
Methods inherited from class com.noelios.restlet.ConnectorHelper
createContext, getProtocols, start, stop
 
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.

handle

public void handle(Request request,
                   Response response)
Description copied from class: ConnectorHelper
Handles a call.

Overrides:
handle in class ConnectorHelper
Parameters:
request - The request to handle.
response - The response to update.

getConverter

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

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

setConverter

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

Parameters:
converter - The converter to set.


Copyright © 2005-2007 Noelios Technologies.