All Packages Class Hierarchy This Package Previous Next Index
Interface uhr.core.attract.MatchPolicy
- public interface MatchPolicy
MatchPolicy is the policy used for making decision about matching
ServiceNeeds to available ServiceItems.
-
isMatch(ServiceNeed,
ServiceItem)
- Returns true if the item is a match for the need.
-
pickMatch(MatchChance)
- Returns the ServiceItem that is a satisfactory match for the
"chance session" or null if no match.
pickMatch
public abstract ServiceItem pickMatch(MatchChance chance)
- Returns the ServiceItem that is a satisfactory match for the
"chance session" or null if no match. The chance argument is one
of a series of one or more chances in a chance session. A session
starts with
MatchChance.isFirstChance() == true and
ends with MatchChance.isLastChance() == true.
- Parameters:
- chance - the data representing this particular match chance.
- Returns:
- the ServcieItems that is a match or null for no match
at this time.
isMatch
public abstract boolean isMatch(ServiceNeed need,
ServiceItem item)
- Returns true if the item is a match for the need. This is useful
for manual links to assert the link is a valid match, and other
future uses.
- Parameters:
- need - the ServiceNeed for the possible match.
- item - the ServiceItem for the possible match.
All Packages Class Hierarchy This Package Previous Next Index