public class PlatformLocationResolver extends Object implements LocationResolver<PlatformNodeLocation>
LocationResolver| Constructor and Description |
|---|
PlatformLocationResolver() |
| Modifier and Type | Method and Description |
|---|---|
PlatformNodeLocation |
absolutize(PlatformNodeLocation base,
PlatformNodeLocation location)
Resolves the given
location relative to the given base and returns the resolved location. |
String |
applyTemplate(String nameTemplate,
PlatformNodeLocation location,
String endpointName) |
String |
findWildcardMatch(PlatformNodeLocation multiTargetLocation,
PlatformNodeLocation singleLocation)
Given a multi-target location (e.g.
|
boolean |
isMultiTarget(PlatformNodeLocation location)
Returns true if the location could refer to more than one target.
|
boolean |
isParent(PlatformNodeLocation parent,
PlatformNodeLocation child)
Returns true if the child is anywhere under the parent.
|
boolean |
matches(PlatformNodeLocation query,
PlatformNodeLocation location) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabsolutizepublic String findWildcardMatch(PlatformNodeLocation multiTargetLocation, PlatformNodeLocation singleLocation) throws ProtocolException
LocationResolverfindWildcardMatch in interface LocationResolver<PlatformNodeLocation>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(PlatformNodeLocation location)
LocationResolverisMultiTarget in interface LocationResolver<PlatformNodeLocation>location - the location to testtrue if location can refer to multiple targets,
false if it refers to a single locationpublic PlatformNodeLocation absolutize(PlatformNodeLocation base, PlatformNodeLocation 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<PlatformNodeLocation>base - the base location to resolve location againstlocation - the location to resolvepublic boolean isParent(PlatformNodeLocation parent, PlatformNodeLocation child)
LocationResolverisParent in interface LocationResolver<PlatformNodeLocation>parent - parent resourcechild - child resourcepublic boolean matches(PlatformNodeLocation query, PlatformNodeLocation location)
matches in interface LocationResolver<PlatformNodeLocation>public String applyTemplate(String nameTemplate, PlatformNodeLocation location, String endpointName)
applyTemplate in interface LocationResolver<PlatformNodeLocation>Copyright © 2015–2017 Red Hat, Inc.. All rights reserved.