public class CurrentUserEndpointMerger extends AbstractSingleEntityEndpoint<CurrentUserEntity>
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
CURRENT_USER_URI_PATTERN |
Constructor and Description |
---|
CurrentUserEndpointMerger() |
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
|
protected java.lang.Class<CurrentUserEntity> |
getEntityClass() |
protected void |
mergeResponses(CurrentUserEntity clientEntity,
java.util.Map<NodeIdentifier,CurrentUserEntity> entityMap,
java.util.Set<NodeResponse> successfulResponses,
java.util.Set<NodeResponse> problematicResponses)
Merges the responses from all nodes in the given map into the single given entity
|
merge
public static final java.util.regex.Pattern CURRENT_USER_URI_PATTERN
public boolean canHandle(java.net.URI uri, java.lang.String method)
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 Methodprotected java.lang.Class<CurrentUserEntity> getEntityClass()
getEntityClass
in class AbstractSingleEntityEndpoint<CurrentUserEntity>
protected void mergeResponses(CurrentUserEntity clientEntity, java.util.Map<NodeIdentifier,CurrentUserEntity> entityMap, java.util.Set<NodeResponse> successfulResponses, java.util.Set<NodeResponse> problematicResponses)
AbstractSingleEntityEndpoint
mergeResponses
in class AbstractSingleEntityEndpoint<CurrentUserEntity>
clientEntity
- the Entity to merge responses intoentityMap
- the responses from all nodessuccessfulResponses
- the responses from nodes that completed the request successfullyproblematicResponses
- the responses from nodes that did not complete the request successfully