org.jboss.resteasy.client
public class ClientRequest extends ClientInterceptorRepositoryImpl implements Cloneable
ClientInterceptorRepositoryImpl.InterceptorType
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
attributes |
protected Object |
body |
protected Annotation[] |
bodyAnnotations |
protected MediaType |
bodyContentType |
protected Type |
bodyGenericType |
protected Class |
bodyType |
protected ClientExecutor |
executor |
protected String |
finalUri |
protected boolean |
followRedirects |
protected MultivaluedMap<String,String> |
formParameters |
protected MultivaluedMap<String,Object> |
headers |
protected String |
httpMethod |
protected LinkHeader |
linkHeader |
protected MultivaluedMap<String,String> |
matrixParameters |
protected List<String> |
pathParameterList |
protected MultivaluedMap<String,String> |
pathParameters |
protected ResteasyProviderFactory |
providerFactory |
protected MultivaluedMap<String,String> |
queryParameters |
protected UriBuilderImpl |
uri |
Constructor and Description |
---|
ClientRequest(String uriTemplate) |
ClientRequest(String uriTemplate,
ClientExecutor executor) |
ClientRequest(UriBuilder uri,
ClientExecutor executor) |
ClientRequest(UriBuilder uri,
ClientExecutor executor,
ResteasyProviderFactory providerFactory) |
copyClientInterceptorsTo, getExecutionInterceptorList, getExecutionInterceptors, getInterceptors, getInterceptors, getReaderInterceptorList, getReaderInterceptors, getWriterInterceptorList, getWriterInterceptors, prefixClientInterceptorsTo, registerInterceptor, setExecutionInterceptors, setExecutionInterceptors, setReaderInterceptors, setReaderInterceptors, setWriterInterceptors, setWriterInterceptors
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 LinkHeader linkHeader
public ClientRequest(String uriTemplate)
public ClientRequest(String uriTemplate, ClientExecutor executor)
public ClientRequest(UriBuilder uri, ClientExecutor executor)
public ClientRequest(UriBuilder uri, ClientExecutor executor, ResteasyProviderFactory providerFactory)
public static void setDefaultExecutorClass(String classname)
classname
- public static ClientExecutor getDefaultExecutor()
public void clear()
public boolean followRedirects()
public ClientRequest followRedirects(boolean followRedirects)
public ClientRequest accept(MediaType accepts)
public ClientRequest accept(String accept)
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 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> 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,
- ClientResponseFailureException
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)
Copyright © 2014. All Rights Reserved.