All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface uhr.core.attract.ServiceNeedMatcher

public interface ServiceNeedMatcher
This is the custom matcher to use for a ServiceNeed. It's designed to allow any possible type of matching logic conceivable, we hope. :-)


Method Index

 o pickBestAttractor(ServiceNeed, Enumeration, boolean)
Picks and returns the best attractor for the need.

Methods

 o pickBestAttractor
 public abstract Attractor pickBestAttractor(ServiceNeed need,
                                             Enumeration serviceAttractors,
                                             boolean isFinalChance)
Picks and returns the best attractor for the need. The serviceAttractors are guarenteed to be of the type needed.

Considering the need, examines the serviceAttractors avaialable and returns the best pick or null for none preferred at this time. If null is returned, the call will be made again unless this was the last chance. Returning null if isFinalChance is true indicates the service is not needed, which may be rare.

An example of isFinalChance being false is when a need occurs and there are more parent containers, or no automatic "pull in" from Part Inventory has occured yet.

Parameters:
need - the need in question.
serviceAttractors - the service attractors available to pick from. This is successively larger for each call, until it reaches its maximum size for isFinalChance equals true.
isFinalChance - true if this is the last chance to pick or false if there will be more chances.
Returns:
the best pick or null for none at this time.

All Packages  Class Hierarchy  This Package  Previous  Next  Index