|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.resteasy.client.core.ClientInterceptorRepositoryImpl
org.jboss.resteasy.client.ClientRequest
@Deprecated public class ClientRequest
Create a hand coded request to send to the server. You call methods like accept(), body(), pathParameter() etc. to create the state of the request. Then you call a get(), post(), etc. method to execute the request. After an execution of a request, the internal state remains the same. You can invoke the request again. You can clear the request with the clear() method.
Field Summary | |
---|---|
protected Map<String,Object> |
attributes
Deprecated. |
protected Object |
body
Deprecated. |
protected Annotation[] |
bodyAnnotations
Deprecated. |
protected MediaType |
bodyContentType
Deprecated. |
protected Type |
bodyGenericType
Deprecated. |
protected Class |
bodyType
Deprecated. |
protected ClientExecutor |
executor
Deprecated. |
protected String |
finalUri
Deprecated. |
protected boolean |
followRedirects
Deprecated. |
protected MultivaluedMap<String,String> |
formParameters
Deprecated. |
protected MultivaluedMap<String,Object> |
headers
Deprecated. |
protected String |
httpMethod
Deprecated. |
protected LinkHeader |
linkHeader
Deprecated. |
protected MultivaluedMap<String,String> |
matrixParameters
Deprecated. |
protected List<String> |
pathParameterList
Deprecated. |
protected MultivaluedMap<String,String> |
pathParameters
Deprecated. |
protected ResteasyProviderFactory |
providerFactory
Deprecated. |
protected MultivaluedMap<String,String> |
queryParameters
Deprecated. |
protected UriBuilderImpl |
uri
Deprecated. |
Constructor Summary | |
---|---|
ClientRequest(String uriTemplate)
Deprecated. |
|
ClientRequest(String uriTemplate,
ClientExecutor executor)
Deprecated. |
|
ClientRequest(UriBuilder uri,
ClientExecutor executor)
Deprecated. |
|
ClientRequest(UriBuilder uri,
ClientExecutor executor,
ResteasyProviderFactory providerFactory)
Deprecated. |
Method Summary | ||
---|---|---|
ClientRequest |
accept(MediaType accepts)
Deprecated. |
|
ClientRequest |
accept(String accept)
Deprecated. |
|
ClientRequest |
addLink(Link link)
Deprecated. |
|
ClientRequest |
addLink(String title,
String rel,
String href,
String type)
Deprecated. |
|
ClientRequest |
body(MediaType contentType,
Object data)
Deprecated. |
|
ClientRequest |
body(MediaType contentType,
Object data,
Class type,
Type genericType,
Annotation[] annotations)
Deprecated. |
|
ClientRequest |
body(MediaType contentType,
Object data,
GenericType genericType)
Deprecated. |
|
ClientRequest |
body(MediaType contentType,
Object data,
Type genericType)
Deprecated. |
|
ClientRequest |
body(String contentType,
Object data)
Deprecated. |
|
void |
clear()
Deprecated. Clear this request's state so that it can be re-used |
|
ClientRequest |
cookie(Cookie cookie)
Deprecated. |
|
ClientRequest |
cookie(String cookieName,
Object value)
Deprecated. |
|
Link |
create()
Deprecated. Automatically does POST/Create pattern. |
|
ClientRequest |
createSubsequentRequest(URI uri)
Deprecated. |
|
ClientResponse |
delete()
Deprecated. |
|
|
delete(Class<T> returnType)
Deprecated. |
|
|
delete(Class<T> returnType,
Type genericType)
Deprecated. |
|
|
delete(GenericType type)
Deprecated. |
|
ClientResponse |
execute()
Deprecated. |
|
boolean |
followRedirects()
Deprecated. |
|
ClientRequest |
followRedirects(boolean followRedirects)
Deprecated. |
|
ClientRequest |
formParameter(String parameterName,
Object value)
Deprecated. |
|
ClientResponse |
get()
Deprecated. |
|
|
get(Class<T> returnType)
Deprecated. Templates the returned ClientResponse for easy access to returned entity |
|
|
get(Class<T> returnType,
Type genericType)
Deprecated. |
|
|
get(GenericType type)
Deprecated. |
|
Map<String,Object> |
getAttributes()
Deprecated. |
|
Object |
getBody()
Deprecated. |
|
Annotation[] |
getBodyAnnotations()
Deprecated. |
|
MediaType |
getBodyContentType()
Deprecated. |
|
Type |
getBodyGenericType()
Deprecated. |
|
Class |
getBodyType()
Deprecated. |
|
static ClientExecutor |
getDefaultExecutor()
Deprecated. |
|
ClientExecutor |
getExecutor()
Deprecated. |
|
MultivaluedMap<String,String> |
getFormParameters()
Deprecated. |
|
MultivaluedMap<String,String> |
getHeaders()
Deprecated. |
|
MultivaluedMap<String,Object> |
getHeadersAsObjects()
Deprecated. |
|
String |
getHttpMethod()
Deprecated. |
|
MultivaluedMap<String,String> |
getMatrixParameters()
Deprecated. |
|
List<String> |
getPathParameterList()
Deprecated. |
|
MultivaluedMap<String,String> |
getPathParameters()
Deprecated. |
|
ResteasyProviderFactory |
getProviderFactory()
Deprecated. |
|
MultivaluedMap<String,String> |
getQueryParameters()
Deprecated. |
|
|
getTarget(Class<T> returnType)
Deprecated. Tries to automatically unmarshal to target type. |
|
String |
getUri()
Deprecated. This method populates all path, matrix, and query parameters and saves it internally. |
|
ClientResponse |
head()
Deprecated. |
|
ClientRequest |
header(String headerName,
Object value)
Deprecated. |
|
ClientResponse |
httpMethod(String httpMethod)
Deprecated. |
|
|
httpMethod(String method,
Class<T> returnType)
Deprecated. |
|
|
httpMethod(String method,
Class<T> returnType,
Type genericType)
Deprecated. |
|
|
httpMethod(String method,
GenericType type)
Deprecated. |
|
ClientRequest |
matrixParameter(String parameterName,
Object value)
Deprecated. |
|
ClientResponse |
options()
Deprecated. |
|
|
options(Class<T> returnType)
Deprecated. |
|
|
options(Class<T> returnType,
Type genericType)
Deprecated. |
|
|
options(GenericType type)
Deprecated. |
|
void |
overrideUri(URI uri)
Deprecated. |
|
ClientRequest |
pathParameter(String parameterName,
Object value)
Deprecated. |
|
ClientRequest |
pathParameters(Object... values)
Deprecated. |
|
ClientResponse |
post()
Deprecated. |
|
|
post(Class<T> returnType)
Deprecated. |
|
|
post(Class<T> returnType,
Type genericType)
Deprecated. |
|
|
post(GenericType type)
Deprecated. |
|
|
postTarget(Class<T> returnType)
Deprecated. |
|
ClientResponse |
put()
Deprecated. |
|
|
put(Class<T> returnType)
Deprecated. |
|
|
put(Class<T> returnType,
Type genericType)
Deprecated. |
|
|
put(GenericType type)
Deprecated. |
|
ClientRequest |
queryParameter(String parameterName,
Object value)
Deprecated. |
|
static void |
setDefaultExecutorClass(String classname)
Deprecated. Set the default executor class name. |
|
void |
setHttpMethod(String httpMethod)
Deprecated. |
|
protected String |
toHeaderString(Object object)
Deprecated. |
|
protected String |
toString(Object object)
Deprecated. |
|
void |
writeRequestBody(MultivaluedMap<String,Object> headers,
OutputStream outputStream)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ResteasyProviderFactory providerFactory
protected UriBuilderImpl uri
protected ClientExecutor executor
protected MultivaluedMap<String,Object> headers
protected MultivaluedMap<String,String> queryParameters
protected MultivaluedMap<String,String> formParameters
protected MultivaluedMap<String,String> pathParameters
protected MultivaluedMap<String,String> matrixParameters
protected Object body
protected Class bodyType
protected Type bodyGenericType
protected Annotation[] bodyAnnotations
protected MediaType bodyContentType
protected boolean followRedirects
protected String httpMethod
protected String finalUri
protected List<String> pathParameterList
protected LinkHeader linkHeader
protected Map<String,Object> attributes
Constructor Detail |
---|
public ClientRequest(String uriTemplate)
public ClientRequest(String uriTemplate, ClientExecutor executor)
public ClientRequest(UriBuilder uri, ClientExecutor executor)
public ClientRequest(UriBuilder uri, ClientExecutor executor, ResteasyProviderFactory providerFactory)
Method Detail |
---|
public static void setDefaultExecutorClass(String classname)
classname
- public static ClientExecutor getDefaultExecutor()
public void clear()
public boolean followRedirects()
public Map<String,Object> getAttributes()
public ClientRequest followRedirects(boolean followRedirects)
public ClientRequest accept(MediaType accepts)
public ClientRequest accept(String accept)
protected String toString(Object object)
protected String toHeaderString(Object object)
public ClientRequest addLink(Link link)
public ClientRequest addLink(String title, String rel, String href, String type)
public ClientRequest formParameter(String parameterName, Object value)
public ClientRequest queryParameter(String parameterName, Object value)
public ClientRequest matrixParameter(String parameterName, Object value)
public ClientRequest header(String headerName, Object value)
public ClientRequest cookie(String cookieName, Object value)
public ClientRequest cookie(Cookie cookie)
public ClientRequest pathParameter(String parameterName, Object value)
public ClientRequest pathParameters(Object... values)
public ClientRequest body(String contentType, Object data)
public ClientRequest body(MediaType contentType, Object data)
public ClientRequest body(MediaType contentType, Object data, GenericType genericType)
public ClientRequest body(MediaType contentType, Object data, Type genericType)
public ClientRequest body(MediaType contentType, Object data, Class type, Type genericType, Annotation[] annotations)
public ResteasyProviderFactory getProviderFactory()
public ClientExecutor getExecutor()
public MultivaluedMap<String,String> getHeaders()
public MultivaluedMap<String,Object> getHeadersAsObjects()
public MultivaluedMap<String,String> getQueryParameters()
public MultivaluedMap<String,String> getFormParameters()
public MultivaluedMap<String,String> getPathParameters()
public List<String> getPathParameterList()
public MultivaluedMap<String,String> getMatrixParameters()
public Object getBody()
public Class getBodyType()
public Type getBodyGenericType()
public Annotation[] getBodyAnnotations()
public MediaType getBodyContentType()
public String getHttpMethod()
public void setHttpMethod(String httpMethod)
public ClientResponse execute() throws Exception
Exception
public void writeRequestBody(MultivaluedMap<String,Object> headers, OutputStream outputStream) throws IOException
IOException
public ClientResponse get() throws Exception
Exception
public <T> T getTarget(Class<T> returnType) throws Exception
T
- returnType
-
Exception
public <T> ClientResponse<T> get(Class<T> returnType) throws Exception
T
- returnType
-
Exception
public <T> ClientResponse<T> get(Class<T> returnType, Type genericType) throws Exception
Exception
public <T> ClientResponse<T> get(GenericType type) throws Exception
Exception
public ClientResponse head() throws Exception
Exception
public ClientResponse put() throws Exception
Exception
public <T> ClientResponse<T> put(Class<T> returnType) throws Exception
Exception
public <T> ClientResponse<T> put(Class<T> returnType, Type genericType) throws Exception
Exception
public <T> ClientResponse<T> put(GenericType type) throws Exception
Exception
public ClientResponse post() throws Exception
Exception
public <T> ClientResponse<T> post(Class<T> returnType) throws Exception
Exception
public <T> T postTarget(Class<T> returnType) throws Exception
Exception
public <T> ClientResponse<T> post(Class<T> returnType, Type genericType) throws Exception
Exception
public <T> ClientResponse<T> post(GenericType type) throws Exception
Exception
public Link create() throws Exception, ClientResponseFailure
Exception,
- ClientResponseFailure
Exception
ClientResponseFailure
public ClientResponse delete() throws Exception
Exception
public <T> ClientResponse<T> delete(Class<T> returnType) throws Exception
Exception
public <T> ClientResponse<T> delete(Class<T> returnType, Type genericType) throws Exception
Exception
public <T> ClientResponse<T> delete(GenericType type) throws Exception
Exception
public ClientResponse options() throws Exception
Exception
public <T> ClientResponse<T> options(Class<T> returnType) throws Exception
Exception
public <T> ClientResponse<T> options(Class<T> returnType, Type genericType) throws Exception
Exception
public <T> ClientResponse<T> options(GenericType type) throws Exception
Exception
public ClientResponse httpMethod(String httpMethod) throws Exception
Exception
public <T> ClientResponse<T> httpMethod(String method, Class<T> returnType) throws Exception
Exception
public <T> ClientResponse<T> httpMethod(String method, Class<T> returnType, Type genericType) throws Exception
Exception
public <T> ClientResponse<T> httpMethod(String method, GenericType type) throws Exception
Exception
public void overrideUri(URI uri)
public String getUri() throws Exception
Exception
public ClientRequest createSubsequentRequest(URI uri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |