public class DMRLocationResolver extends Object implements LocationResolver<DMRNodeLocation>
LocationResolver| Constructor and Description |
|---|
DMRLocationResolver() |
| Modifier and Type | Method and Description |
|---|---|
DMRNodeLocation |
absolutize(DMRNodeLocation base,
DMRNodeLocation location)
Resolves the given
location relative to the given base and returns the resolved location. |
String |
applyTemplate(String nameTemplate,
DMRNodeLocation location,
String endpointName) |
String |
findWildcardMatch(DMRNodeLocation multiTargetLocation,
DMRNodeLocation singleLocation)
Given a multi-target location (e.g.
|
boolean |
isMultiTarget(DMRNodeLocation location)
Returns true if the location could refer to more than one target.
|
boolean |
isParent(DMRNodeLocation parent,
DMRNodeLocation child)
Returns true if the child is anywhere under the parent.
|
boolean |
matches(DMRNodeLocation query,
DMRNodeLocation location) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabsolutizepublic String findWildcardMatch(DMRNodeLocation multiTargetLocation, DMRNodeLocation singleLocation) throws ProtocolException
LocationResolverfindWildcardMatch in interface LocationResolver<DMRNodeLocation>multiTargetLocation - a query that was used to find the given singleLocationsingleLocation - a single absolute location that has the multiTargetLocation wildcard resolvedProtocolException - if the single location doesn't have any matching portionpublic boolean isMultiTarget(DMRNodeLocation location)
LocationResolverisMultiTarget in interface LocationResolver<DMRNodeLocation>location - the location to testtrue if location can refer to multiple targets,
false if it refers to a single locationpublic DMRNodeLocation absolutize(DMRNodeLocation base, DMRNodeLocation location)
LocationResolverlocation relative to the given base and returns the resolved location. Note
that this method can eventually return location or base if the resolution would yield a Location
equivalent to any of the two.absolutize in interface LocationResolver<DMRNodeLocation>base - the base location to resolve location againstlocation - the location to resolvepublic boolean isParent(DMRNodeLocation parent, DMRNodeLocation child)
LocationResolverisParent in interface LocationResolver<DMRNodeLocation>parent - parent resourcechild - child resourcepublic boolean matches(DMRNodeLocation query, DMRNodeLocation location)
matches in interface LocationResolver<DMRNodeLocation>public String applyTemplate(String nameTemplate, DMRNodeLocation location, String endpointName)
applyTemplate in interface LocationResolver<DMRNodeLocation>Copyright © 2015 Red Hat, Inc.. All rights reserved.