public class ControllerServiceReferenceEndpointMerger extends java.lang.Object implements EndpointResponseMerger
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
CONTROLLER_SERVICE_REFERENCES_URI_PATTERN |
Constructor and Description |
---|
ControllerServiceReferenceEndpointMerger() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(java.net.URI uri,
java.lang.String method)
Indicates whether or not this EndpointResponseMapper can handle mapping responses
for the given URI and HTTP Method
|
NodeResponse |
merge(java.net.URI uri,
java.lang.String method,
java.util.Set<NodeResponse> successfulResponses,
java.util.Set<NodeResponse> problematicResponses,
NodeResponse clientResponse)
Maps the given Node Responses to a single NodeResponse that is appropriate to return
to the client/user
|
public static final java.util.regex.Pattern CONTROLLER_SERVICE_REFERENCES_URI_PATTERN
public ControllerServiceReferenceEndpointMerger()
public boolean canHandle(java.net.URI uri, java.lang.String method)
EndpointResponseMerger
canHandle
in interface EndpointResponseMerger
uri
- the URI of the endpointmethod
- the HTTP Method used to interact with the endpointtrue
if the EndpointResponseMapper can handle mapping responses
for the endpoint described by the given URI and HTTP Methodpublic NodeResponse merge(java.net.URI uri, java.lang.String method, java.util.Set<NodeResponse> successfulResponses, java.util.Set<NodeResponse> problematicResponses, NodeResponse clientResponse)
EndpointResponseMerger
merge
in interface EndpointResponseMerger
uri
- the URI of the REST Endpointmethod
- the HTTP Method used to interact with the REST EndpointsuccessfulResponses
- the responses from nodes that were successful in handling the requestproblematicResponses
- the responses from nodes that were not successful in handling the requestclientResponse
- the response that was chosen to be returned to the client