Package org.jboss.resteasy.client
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:
-
Invocation
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.protected Object
Deprecated.protected Annotation[]
Deprecated.protected javax.ws.rs.core.MediaType
Deprecated.protected Type
Deprecated.protected Class
Deprecated.private static String
Deprecated.protected ClientExecutor
Deprecated.protected String
Deprecated.protected boolean
Deprecated.Deprecated.Deprecated.protected String
Deprecated.protected LinkHeader
Deprecated.Deprecated.Deprecated.Deprecated.protected ResteasyProviderFactory
Deprecated.Deprecated.protected ResteasyUriBuilder
Deprecated. -
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.void
clear()
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.boolean
Deprecated.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.MediaType
Deprecated.Deprecated.Deprecated.private static javax.ws.rs.core.UriBuilder
getBuilder
(String uriTemplate) Deprecated.static ClientExecutor
Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.<T> T
Deprecated.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.void
overrideUri
(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> T
postTarget
(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 void
setDefaultExecutorClass
(String classname) Deprecated.Set the default executor class name.void
setHttpMethod
(String httpMethod) Deprecated.protected String
toHeaderString
(Object object) Deprecated.protected String
Deprecated.void
writeRequestBody
(javax.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream outputStream) Deprecated.Methods inherited from class org.jboss.resteasy.client.core.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
Deprecated. -
queryParameters
Deprecated. -
formParameters
Deprecated. -
pathParameters
Deprecated. -
matrixParameters
Deprecated. -
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
Deprecated. -
linkHeader
Deprecated. -
attributes
Deprecated. -
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
Deprecated. -
followRedirects
Deprecated. -
accept
Deprecated. -
accept
Deprecated. -
toString
Deprecated. -
toHeaderString
Deprecated. -
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
Deprecated.- Returns:
- a copy of all header objects converted to a string
-
getHeadersAsObjects
Deprecated. -
getQueryParameters
Deprecated. -
getFormParameters
Deprecated. -
getPathParameters
Deprecated. -
getPathParameterList
Deprecated. -
getMatrixParameters
Deprecated. -
getBody
Deprecated. -
getBodyType
Deprecated. -
getBodyGenericType
Deprecated. -
getBodyAnnotations
Deprecated. -
getBodyContentType
public javax.ws.rs.core.MediaType getBodyContentType()Deprecated. -
getHttpMethod
Deprecated. -
setHttpMethod
Deprecated. -
execute
Deprecated.- Throws:
Exception
-
writeRequestBody
public void writeRequestBody(javax.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream outputStream) throws IOExceptionDeprecated.- Throws:
IOException
-
get
Deprecated.- Throws:
Exception
-
getTarget
Deprecated.Tries to automatically unmarshal to target type.- Type Parameters:
T
-- Parameters:
returnType
-- Returns:
- Throws:
Exception
-
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
Deprecated.- Throws:
Exception
-
head
Deprecated.- Throws:
Exception
-
put
Deprecated.- Throws:
Exception
-
put
Deprecated.- Throws:
Exception
-
put
Deprecated.- Throws:
Exception
-
put
Deprecated.- Throws:
Exception
-
post
Deprecated.- Throws:
Exception
-
post
Deprecated.- Throws:
Exception
-
postTarget
Deprecated.- Throws:
Exception
-
post
Deprecated.- Throws:
Exception
-
post
Deprecated.- Throws:
Exception
-
create
Deprecated.Automatically does POST/Create pattern. Will throw a ClientResponseFailure if status is something other than 201- Returns:
- Link to created resource
- Throws:
Exception
ClientResponseFailure
-
delete
Deprecated.- Throws:
Exception
-
delete
Deprecated.- Throws:
Exception
-
delete
Deprecated.- Throws:
Exception
-
delete
Deprecated.- Throws:
Exception
-
options
Deprecated.- Throws:
Exception
-
options
Deprecated.- Throws:
Exception
-
options
Deprecated.- Throws:
Exception
-
options
Deprecated.- Throws:
Exception
-
httpMethod
Deprecated.- Throws:
Exception
-
httpMethod
Deprecated.- Throws:
Exception
-
httpMethod
public <T> ClientResponse<T> httpMethod(String method, Class<T> returnType, Type genericType) throws Exception Deprecated.- Throws:
Exception
-
httpMethod
Deprecated.- Throws:
Exception
-
overrideUri
Deprecated. -
getUri
Deprecated.This method populates all path, matrix, and query parameters and saves it internally. Once its called once it returns the cached value.- Returns:
- Throws:
Exception
-
createSubsequentRequest
Deprecated.
-