org.jboss.resteasy.client
Class ClientRequest

java.lang.Object
  extended by org.jboss.resteasy.client.ClientRequest

public class ClientRequest
extends java.lang.Object

Version:
$Revision: 1 $
Author:
Solomon Duskis

Field Summary
protected  ResteasyProviderFactory providerFactory
           
 
Constructor Summary
ClientRequest(java.lang.String uriTemplate)
           
ClientRequest(java.lang.String uriTemplate, org.apache.commons.httpclient.HttpClient httpClient)
           
ClientRequest(java.lang.String uriTemplate, org.apache.commons.httpclient.HttpClient httpClient, ResteasyProviderFactory providerFactory)
           
 
Method Summary
 ClientRequest accept(MediaType accepts)
           
 ClientRequest accept(java.lang.String accept)
           
 ClientRequest body(java.lang.String contentType, java.lang.Object data)
           
 ClientRequest cookie(Cookie cookie)
           
 ClientRequest cookie(java.lang.String cookieName, java.lang.Object value)
           
 ClientResponse<java.lang.Void> delete()
           
<T> ClientResponse<T>
delete(java.lang.Class<T> returnType)
           
 ClientRequest formParameter(java.lang.String parameterName, java.lang.Object value)
           
 ClientResponse<byte[]> get()
           
<T> ClientResponse<T>
get(java.lang.Class<T> returnType)
           
 ClientRequest header(java.lang.String headerName, java.lang.Object value)
           
 ClientRequest interceptor(ClientInterceptor clientInterceptor)
           
 ClientRequest interceptors(java.util.Collection<ClientInterceptor> clientInterceptors)
           
 ClientRequest marshaller(Marshaller marshaller, java.lang.Object value)
          This is mostly used internally, but the Marshaller can be used as an "interceptor"
 ClientRequest pathParameter(java.lang.String parameterName, java.lang.Object value)
           
 ClientRequest pathParameter(java.lang.String parameterName, java.lang.Object value, boolean encoded)
           
 ClientResponse<java.lang.Void> post()
           
<T> ClientResponse<T>
post(java.lang.Class<T> returnType)
           
 ClientResponse<java.lang.Void> put()
           
<T> ClientResponse<T>
put(java.lang.Class<T> returnType)
           
 ClientRequest queryParameter(java.lang.String parameterName, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

providerFactory

protected ResteasyProviderFactory providerFactory
Constructor Detail

ClientRequest

public ClientRequest(java.lang.String uriTemplate)

ClientRequest

public ClientRequest(java.lang.String uriTemplate,
                     org.apache.commons.httpclient.HttpClient httpClient)

ClientRequest

public ClientRequest(java.lang.String uriTemplate,
                     org.apache.commons.httpclient.HttpClient httpClient,
                     ResteasyProviderFactory providerFactory)
Method Detail

interceptor

public ClientRequest interceptor(ClientInterceptor clientInterceptor)

interceptors

public ClientRequest interceptors(java.util.Collection<ClientInterceptor> clientInterceptors)

accept

public ClientRequest accept(MediaType accepts)

accept

public ClientRequest accept(java.lang.String accept)

formParameter

public ClientRequest formParameter(java.lang.String parameterName,
                                   java.lang.Object value)

queryParameter

public ClientRequest queryParameter(java.lang.String parameterName,
                                    java.lang.Object value)

header

public ClientRequest header(java.lang.String headerName,
                            java.lang.Object value)

cookie

public ClientRequest cookie(java.lang.String cookieName,
                            java.lang.Object value)

cookie

public ClientRequest cookie(Cookie cookie)

pathParameter

public ClientRequest pathParameter(java.lang.String parameterName,
                                   java.lang.Object value)

pathParameter

public ClientRequest pathParameter(java.lang.String parameterName,
                                   java.lang.Object value,
                                   boolean encoded)

marshaller

public ClientRequest marshaller(Marshaller marshaller,
                                java.lang.Object value)
This is mostly used internally, but the Marshaller can be used as an "interceptor"

Parameters:
marshaller -
value -
Returns:

body

public ClientRequest body(java.lang.String contentType,
                          java.lang.Object data)

get

public ClientResponse<byte[]> get()
                           throws java.lang.Exception
Throws:
java.lang.Exception

get

public <T> ClientResponse<T> get(java.lang.Class<T> returnType)
                      throws java.lang.Exception
Throws:
java.lang.Exception

post

public ClientResponse<java.lang.Void> post()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

post

public <T> ClientResponse<T> post(java.lang.Class<T> returnType)
                       throws java.lang.Exception
Throws:
java.lang.Exception

put

public ClientResponse<java.lang.Void> put()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

put

public <T> ClientResponse<T> put(java.lang.Class<T> returnType)
                      throws java.lang.Exception
Throws:
java.lang.Exception

delete

public ClientResponse<java.lang.Void> delete()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

delete

public <T> ClientResponse<T> delete(java.lang.Class<T> returnType)
                         throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2009. All Rights Reserved.