public class AliasEndpoint extends RestEndpoint
RestEndpoint.uri| Constructor and Description |
|---|
AliasEndpoint(String uri,
RestEndpoint endpoint)
Instantiates a
AliasEndpoint. |
| Modifier and Type | Method and Description |
|---|---|
HTTPResponse |
delete(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
Handles
DELETE request on this endpoint. |
HTTPResponse |
get(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
Handles
GET request on this endpoint. |
RestEndpoint |
getEndpoint()
Gets the endpoint.
|
HTTPResponse |
post(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
Handles
POST request on this endpoint. |
HTTPResponse |
put(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
Handles
PUT request on this endpoint. |
void |
setEndpoint(RestEndpoint endpoint)
Sets the endpoint.
|
getURIpublic AliasEndpoint(String uri, RestEndpoint endpoint)
AliasEndpoint.uri - the uri, cannot be null.endpoint - the end point to forward the request to, cannot be null.IllegalArgumentException - if URI is emptypublic HTTPResponse delete(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
RestEndpointDELETE request on this endpoint.
Default implementation return a a status code 501
delete in class RestEndpointrequest - the request to handle.headers - request headers.parameters - parsed query and body parameters.public HTTPResponse get(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
RestEndpointGET request on this endpoint.
Default implementation return a a status code 501
get in class RestEndpointrequest - the request to handle.headers - request headers.parameters - parsed query and body parameters.public RestEndpoint getEndpoint()
public HTTPResponse post(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
RestEndpointPOST request on this endpoint.
Default implementation return a a status code 501
post in class RestEndpointrequest - the request to handle.headers - request headers.parameters - parsed query and body parameters.public HTTPResponse put(HTTPRequest request,
Map<String,String> headers,
Map<String,String> parameters)
RestEndpointPUT request on this endpoint.
Default implementation return a a status code 501
put in class RestEndpointrequest - the request to handle.headers - request headers.parameters - parsed query and body parameters.public void setEndpoint(RestEndpoint endpoint)
endpoint - the endpoint to set, cannot be null.