public class AliasEndpoint extends RestEndpoint
RestEndpoint
.uri
Constructor and Description |
---|
AliasEndpoint(java.lang.String uri,
RestEndpoint endpoint)
Instantiates a
AliasEndpoint . |
Modifier and Type | Method and Description |
---|---|
HTTPResponse |
delete(HTTPRequest request,
java.util.Map<java.lang.String,java.lang.String> attributes)
Handles
DELETE request on this endpoint. |
HTTPResponse |
get(HTTPRequest request,
java.util.Map<java.lang.String,java.lang.String> attributes)
Handles
GET request on this endpoint. |
RestEndpoint |
getEndpoint()
Gets the endpoint.
|
HTTPResponse |
post(HTTPRequest request,
java.util.Map<java.lang.String,java.lang.String> attributes)
Handles
POST request on this endpoint. |
HTTPResponse |
put(HTTPRequest request,
java.util.Map<java.lang.String,java.lang.String> attributes)
Handles
PUT request on this endpoint. |
void |
setEndpoint(RestEndpoint endpoint)
Sets the endpoint.
|
getURI, isGlobal
public AliasEndpoint(java.lang.String uri, RestEndpoint endpoint)
AliasEndpoint
.uri
- the uri, cannot be null
.endpoint
- the end point to forward the request to, cannot be null
.java.lang.IllegalArgumentException
- if URI is emptypublic RestEndpoint getEndpoint()
public void setEndpoint(RestEndpoint endpoint)
endpoint
- the endpoint to set, cannot be null
.public HTTPResponse get(HTTPRequest request, java.util.Map<java.lang.String,java.lang.String> attributes)
RestEndpoint
GET
request on this endpoint.
Default implementation return a status code 501
get
in class RestEndpoint
request
- the request to handle.attributes
- the attributes populated by the request processing.public HTTPResponse post(HTTPRequest request, java.util.Map<java.lang.String,java.lang.String> attributes)
RestEndpoint
POST
request on this endpoint.
Default implementation return a status code 501
post
in class RestEndpoint
request
- the request to handle.attributes
- the attributes populated by the request processing.public HTTPResponse put(HTTPRequest request, java.util.Map<java.lang.String,java.lang.String> attributes)
RestEndpoint
PUT
request on this endpoint.
Default implementation return a status code 501
put
in class RestEndpoint
request
- the request to handle.attributes
- the attributes populated by the request processing.public HTTPResponse delete(HTTPRequest request, java.util.Map<java.lang.String,java.lang.String> attributes)
RestEndpoint
DELETE
request on this endpoint.
Default implementation return a status code 501
delete
in class RestEndpoint
request
- the request to handle.attributes
- the attributes populated by the request processing.