public class GXWebTargetAdapterRequest extends Object
| Modifier and Type | Method and Description |
|---|---|
GXWebTargetAdapterRequest |
configProperty(String name,
String value)
Sets a new property in the request.
|
GXInboundResponse |
connect()
Sends the CONNECT request to the web application with no body.
|
GXInboundResponse |
delete()
Sends the DELETE request to the web application.
|
GXWebTargetAdapterRequest |
from(String agent)
Sets the identity user agent associated to the request.
|
GXInboundResponse |
get()
Sends the GET request to the web application.
|
GXInboundResponse |
head()
Sends the HEAD request to the web application.
|
GXWebTargetAdapterRequest |
header(String name,
Object value)
Add an arbitrary header.
|
void |
isExternalCall(boolean ext)
States if the service being called in an external service (not gCube).
|
static GXWebTargetAdapterRequest |
newHTTPSRequest(String address) |
static GXWebTargetAdapterRequest |
newRequest(String address)
Creates a new request.
|
GXInboundResponse |
options()
Sends the OPTIONS request to the web application with no body.
|
GXInboundResponse |
patch()
Sends the PATCH request to the web application with no body.
|
GXWebTargetAdapterRequest |
path(String path)
Adds a positional path parameter to the request.
|
GXInboundResponse |
post()
Sends the POST request to the web application with no body.
|
GXInboundResponse |
post(javax.ws.rs.client.Entity<?> body)
Sends the POST request to the web application.
|
GXInboundResponse |
put()
Sends the PUT request to the web application with no body.
|
GXInboundResponse |
put(javax.ws.rs.client.Entity<?> body)
Sends the PUT request to the web application.
|
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()
Sends the TRACE request to the web application with no body.
|
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)
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
Exceptionpublic GXInboundResponse head() throws Exception
Exceptionpublic GXInboundResponse get() throws Exception
Exceptionpublic GXWebTargetAdapterRequest header(String name, Object value)
public GXInboundResponse put(javax.ws.rs.client.Entity<?> body) throws Exception
body - the body of the requestExceptionpublic GXInboundResponse put() throws Exception
Exceptionpublic GXInboundResponse post(javax.ws.rs.client.Entity<?> body) throws Exception
body - the body of the requestExceptionpublic GXInboundResponse post() throws Exception
Exceptionpublic GXInboundResponse trace() throws Exception
Exceptionpublic GXInboundResponse patch() throws Exception
Exceptionpublic GXInboundResponse options() throws Exception
Exceptionpublic GXInboundResponse connect() throws Exception
Exceptionpublic void isExternalCall(boolean ext)
ext - true if external, false otherwiseCopyright © 2018. All Rights Reserved.