Class ClientRequest
java.lang.Object
org.jboss.resteasy.client.core.ClientInterceptorRepositoryImpl
org.jboss.resteasy.client.ClientRequest
- All Implemented Interfaces:
Cloneable, ClientInterceptorRepository
Deprecated.
The Resteasy client framework in resteasy-jaxrs is replaced by the JAX-RS 2.0 compliant resteasy-client module.
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.
- Version:
- $Revision: 1 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.protected ObjectDeprecated.protected Annotation[]Deprecated.protected javax.ws.rs.core.MediaTypeDeprecated.protected TypeDeprecated.protected ClassDeprecated.private static StringDeprecated.protected ClientExecutorDeprecated.protected StringDeprecated.protected booleanDeprecated.Deprecated.Deprecated.protected StringDeprecated.protected LinkHeaderDeprecated.Deprecated.Deprecated.Deprecated.protected ResteasyProviderFactoryDeprecated.Deprecated.protected ResteasyUriBuilderDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionClientRequest(String uriTemplate) Deprecated.ClientRequest(String uriTemplate, ClientExecutor executor) Deprecated.ClientRequest(javax.ws.rs.core.UriBuilder uri, ClientExecutor executor) Deprecated.ClientRequest(javax.ws.rs.core.UriBuilder uri, ClientExecutor executor, ResteasyProviderFactory providerFactory) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.accept(javax.ws.rs.core.MediaType accepts) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.body(javax.ws.rs.core.MediaType contentType, Object data, Class type, Type genericType, Annotation[] annotations) Deprecated.Deprecated.body(javax.ws.rs.core.MediaType contentType, Object data, GenericType genericType) Deprecated.voidclear()Deprecated.Clear this request's state so that it can be re-usedDeprecated.cookie(javax.ws.rs.core.Cookie cookie) Deprecated.create()Deprecated.Automatically does POST/Create pattern.Deprecated.delete()Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> delete(GenericType type) Deprecated.execute()Deprecated.booleanDeprecated.followRedirects(boolean followRedirects) Deprecated.formParameter(String parameterName, Object value) Deprecated.get()Deprecated.<T> ClientResponse<T> Deprecated.Templates the returned ClientResponse for easy access to returned entity<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> get(GenericType type) Deprecated.Deprecated.getBody()Deprecated.Deprecated.javax.ws.rs.core.MediaTypeDeprecated.Deprecated.Deprecated.private static javax.ws.rs.core.UriBuildergetBuilder(String uriTemplate) Deprecated.static ClientExecutorDeprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.<T> TDeprecated.Tries to automatically unmarshal to target type.getUri()Deprecated.This method populates all path, matrix, and query parameters and saves it internally.head()Deprecated.Deprecated.httpMethod(String httpMethod) Deprecated.<T> ClientResponse<T> httpMethod(String method, Class<T> returnType) Deprecated.<T> ClientResponse<T> httpMethod(String method, Class<T> returnType, Type genericType) Deprecated.<T> ClientResponse<T> httpMethod(String method, GenericType type) Deprecated.matrixParameter(String parameterName, Object value) Deprecated.options()Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> options(GenericType type) Deprecated.voidoverrideUri(URI uri) Deprecated.pathParameter(String parameterName, Object value) Deprecated.pathParameters(Object... values) Deprecated.post()Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> post(GenericType type) Deprecated.<T> TpostTarget(Class<T> returnType) Deprecated.put()Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> Deprecated.<T> ClientResponse<T> put(GenericType type) Deprecated.queryParameter(String parameterName, Object value) Deprecated.static voidsetDefaultExecutorClass(String classname) Deprecated.Set the default executor class name.voidsetHttpMethod(String httpMethod) Deprecated.protected StringtoHeaderString(Object object) Deprecated.protected StringDeprecated.voidwriteRequestBody(javax.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream outputStream) Deprecated.Methods inherited from class ClientInterceptorRepositoryImpl
copyClientInterceptorsTo, getExecutionInterceptorList, getExecutionInterceptors, getInterceptors, getInterceptors, getReaderInterceptorList, getReaderInterceptors, getWriterInterceptorList, getWriterInterceptors, prefixClientInterceptorsTo, registerInterceptor, setExecutionInterceptors, setExecutionInterceptors, setReaderInterceptors, setWriterInterceptors
-
Field Details
-
providerFactory
Deprecated. -
uri
Deprecated. -
executor
Deprecated. -
headers
-
queryParameters
-
formParameters
-
pathParameters
-
matrixParameters
-
body
Deprecated. -
bodyType
Deprecated. -
bodyGenericType
Deprecated. -
bodyAnnotations
Deprecated. -
bodyContentType
protected javax.ws.rs.core.MediaType bodyContentTypeDeprecated. -
followRedirects
protected boolean followRedirectsDeprecated. -
httpMethod
Deprecated. -
finalUri
Deprecated. -
pathParameterList
-
linkHeader
Deprecated. -
attributes
-
defaultExecutorClasss
Deprecated.
-
-
Constructor Details
-
ClientRequest
Deprecated. -
ClientRequest
Deprecated. -
ClientRequest
Deprecated. -
ClientRequest
public ClientRequest(javax.ws.rs.core.UriBuilder uri, ClientExecutor executor, ResteasyProviderFactory providerFactory) Deprecated.
-
-
Method Details
-
setDefaultExecutorClass
Deprecated.Set the default executor class name.- Parameters:
classname-
-
getDefaultExecutor
Deprecated. -
clear
public void clear()Deprecated.Clear this request's state so that it can be re-used -
getBuilder
Deprecated. -
followRedirects
public boolean followRedirects()Deprecated. -
getAttributes
-
followRedirects
Deprecated. -
accept
Deprecated. -
accept
Deprecated. -
toString
-
toHeaderString
-
addLink
Deprecated. -
addLink
Deprecated. -
formParameter
Deprecated. -
queryParameter
Deprecated. -
matrixParameter
Deprecated. -
header
Deprecated. -
cookie
Deprecated. -
cookie
Deprecated. -
pathParameter
Deprecated. -
pathParameters
Deprecated. -
body
Deprecated. -
body
Deprecated. -
body
public ClientRequest body(javax.ws.rs.core.MediaType contentType, Object data, GenericType genericType) Deprecated. -
body
Deprecated. -
body
public ClientRequest body(javax.ws.rs.core.MediaType contentType, Object data, Class type, Type genericType, Annotation[] annotations) Deprecated. -
getProviderFactory
Deprecated. -
getExecutor
Deprecated. -
getHeaders
-
getHeadersAsObjects
-
getQueryParameters
-
getFormParameters
-
getPathParameters
-
getPathParameterList
-
getMatrixParameters
-
getBody
Deprecated. -
getBodyType
Deprecated. -
getBodyGenericType
Deprecated. -
getBodyAnnotations
Deprecated. -
getBodyContentType
public javax.ws.rs.core.MediaType getBodyContentType()Deprecated. -
getHttpMethod
Deprecated. -
setHttpMethod
Deprecated. -
execute
-
writeRequestBody
public void writeRequestBody(javax.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream outputStream) throws IOExceptionDeprecated.- Throws:
IOException
-
get
-
getTarget
-
get
Deprecated.Templates the returned ClientResponse for easy access to returned entity- Type Parameters:
T-- Parameters:
returnType-- Returns:
- Throws:
Exception
-
get
Deprecated.- Throws:
Exception
-
get
-
head
-
put
-
put
Deprecated.- Throws:
Exception
-
put
Deprecated.- Throws:
Exception
-
put
-
post
-
post
Deprecated.- Throws:
Exception
-
postTarget
-
post
Deprecated.- Throws:
Exception
-
post
-
create
Deprecated.Automatically does POST/Create pattern. Will throw a ClientResponseFailure if status is something other than 201- Returns:
- Link to created resource
- Throws:
ExceptionClientResponseFailure
-
delete
-
delete
Deprecated.- Throws:
Exception
-
delete
Deprecated.- Throws:
Exception
-
delete
Deprecated.- Throws:
Exception
-
options
-
options
Deprecated.- Throws:
Exception
-
options
Deprecated.- Throws:
Exception
-
options
Deprecated.- Throws:
Exception
-
httpMethod
-
httpMethod
Deprecated.- Throws:
Exception
-
httpMethod
-
httpMethod
Deprecated.- Throws:
Exception
-
overrideUri
Deprecated. -
getUri
-
createSubsequentRequest
Deprecated.
-