public class GXWebTargetAdapterRequest extends Object implements org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>
| Modifier and Type | Method and Description |
|---|---|
GXWebTargetAdapterRequest |
configProperty(String name,
String value)
Sets a new property in the request.
|
GXInboundResponse |
connect() |
GXInboundResponse |
delete() |
GXWebTargetAdapterRequest |
from(String agent)
Sets the identity user agent associated to the request.
|
GXInboundResponse |
get() |
GXInboundResponse |
head() |
GXWebTargetAdapterRequest |
header(String name,
Object value)
Add an arbitrary header.
|
void |
isExternalCall(boolean ext) |
static GXWebTargetAdapterRequest |
newHTTPSRequest(String address) |
static GXWebTargetAdapterRequest |
newRequest(String address)
Creates a new request.
|
GXInboundResponse |
options() |
GXInboundResponse |
patch() |
GXWebTargetAdapterRequest |
path(String path)
Adds a positional path parameter to the request.
|
GXInboundResponse |
post() |
GXInboundResponse |
post(javax.ws.rs.client.Entity<?> body) |
GXInboundResponse |
put() |
GXInboundResponse |
put(javax.ws.rs.client.Entity<?> body) |
GXWebTargetAdapterRequest |
queryParams(Map<String,Object[]> parameters)
Sets the query parameters for the request.
|
GXWebTargetAdapterRequest |
register(Class<?> component)
Registers a class of a custom JAX-RS component (such as an extension
provider or a
feature meta-provider) to
be instantiated and used in the scope of this request. |
GXWebTargetAdapterRequest |
register(Object component)
Registers an instance of a custom JAX-RS component (such as an extension
provider or a
feature meta-provider) to
be instantiated and used in the scope of this request. |
GXWebTargetAdapterRequest |
setAcceptedResponseType(javax.ws.rs.core.MediaType... acceptedResponseTypes)
Defines the accepted response media types.
|
void |
setSecurityToken(String token)
Overrides the default security token.
|
GXInboundResponse |
trace() |
public static GXWebTargetAdapterRequest newRequest(String address)
address - the address of the web app to callpublic static GXWebTargetAdapterRequest newHTTPSRequest(String address)
public void setSecurityToken(String token)
setSecurityToken in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>token - the new tokenpublic GXWebTargetAdapterRequest from(String agent)
agent - public GXWebTargetAdapterRequest configProperty(String name, String value)
name - the name of the propertyvalue - the value of the propertypublic GXWebTargetAdapterRequest register(Object component)
feature meta-provider) to
be instantiated and used in the scope of this request.component - the component to registerpublic GXWebTargetAdapterRequest register(Class<?> component)
feature meta-provider) to
be instantiated and used in the scope of this request.component - the class of the component to registerpublic GXWebTargetAdapterRequest path(String path) throws UnsupportedEncodingException
path - the new token in the pathUnsupportedEncodingExceptionpublic GXWebTargetAdapterRequest queryParams(Map<String,Object[]> parameters) throws UnsupportedEncodingException
parameters - the parameters that go in the URL after the address and the
path params.UnsupportedEncodingExceptionpublic GXWebTargetAdapterRequest setAcceptedResponseType(javax.ws.rs.core.MediaType... acceptedResponseTypes)
acceptedResponseTypes - accepted response media types.public GXInboundResponse delete() throws Exception
delete in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse head() throws Exception
head in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse get() throws Exception
get in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXWebTargetAdapterRequest header(String name, Object value)
public GXInboundResponse put(javax.ws.rs.client.Entity<?> body) throws Exception
put in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse put() throws Exception
put in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse post(javax.ws.rs.client.Entity<?> body) throws Exception
post in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse post() throws Exception
post in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse trace() throws Exception
trace in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse patch() throws Exception
patch in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse options() throws Exception
options in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic GXInboundResponse connect() throws Exception
connect in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Exceptionpublic void isExternalCall(boolean ext)
isExternalCall in interface org.gcube.common.gxhttp.reference.GXHTTP<javax.ws.rs.client.Entity<?>,GXInboundResponse>Copyright © 2019. All Rights Reserved.