|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cougaar.pizza.plugin.util.RoleWithBlacklistScorer
ServiceDiscovery Service scoring function using Role name and an
exclusion list.
Uses 2 criteria - service role must match scorer role (in Commercial Service Scheme) service provider name must not match one of the names on the blacklist.
All passing descriptions get a score of 1, all failing descriptions get a score of -1.
SDClientPlugin creates the RoleWithBlacklistScorer and attaches it to the MMQueryRequest.
MatchmakerPlugin uses the RoleWithBlacklistScorer to evaluate service descriptions
returned from the yellow pages. All passing service descriptions are added
to the MMQueryRequest results field.
This Scorer is a simple variation on the RoleScorer in the ServiceDiscovery module, as an example of how to modify this.
RoleScorer,
Serialized Form| Constructor Summary | |
RoleWithBlacklistScorer(org.cougaar.planning.ldm.plan.Role role,
java.util.Collection blacklist)
|
|
| Method Summary | |
java.util.Collection |
getBlacklist()
Which providers are not acceptable? |
org.cougaar.planning.ldm.plan.Role |
getRole()
What Role is being requested? |
int |
scoreServiceInfo(org.cougaar.servicediscovery.description.ServiceInfo serviceInfo)
Will be called by MatchmakerPlugin for each ServiceInfo. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RoleWithBlacklistScorer(org.cougaar.planning.ldm.plan.Role role,
java.util.Collection blacklist)
| Method Detail |
public org.cougaar.planning.ldm.plan.Role getRole()
public java.util.Collection getBlacklist()
public int scoreServiceInfo(org.cougaar.servicediscovery.description.ServiceInfo serviceInfo)
scoreServiceInfo in interface org.cougaar.servicediscovery.description.ServiceInfoScorerserviceInfo - The ServiceInfo returned by the YP for which we want a score
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||