| org.cougaar.planning.plugin.legacy.SimplePlugin org.cougaar.servicediscovery.plugin.SDClientPlugin
All known Subclasses: org.cougaar.logistics.plugin.servicediscovery.ALDynamicSDClientPlugin, org.cougaar.servicediscovery.plugin.SDMiniClientPlugin,
SDClientPlugin | public class SDClientPlugin extends SimplePlugin (Code) | | Look up in YP agents providing roles given as parameters,
by creating MMRequests for these. When it gets answers,
create relays with those agents asking for the service.
Keep asking until have contracts in the relays for all roles
and all time intervals.
|
Method Summary | |
protected boolean | alreadyAskedForContractWithProvider(Role role, String providerName, TimeSpan timeSpan) | protected NonOverlappingTimeSpanSet | buildOPCONSchedule() | protected boolean | checkProviderCompletelyCovered(Role role, TimeSpan timeSpan) | protected boolean | checkProviderCompletelyRequested(Role role, TimeSpan timeSpan) | protected boolean | continuousCoverage(TimeSpan targetTimeSpan, TimeSpanSet timeSpanSet) | protected boolean | covered(Role role, TimeSpan timeSpan) | public String | dateString(Date date) | public void | execute() | protected void | findProviders() | protected void | generateServiceRequests(Collection mmRequests) For each answered request, pick an appropriate provider
and send them a service request. | protected Lineage | getCommandLineage(TimeSpan timeSpan) | protected Collection | getCurrentlyUncoveredIntervalsWithoutOutstandingRequests(long desiredStart, long desiredEnd, Role role) For this role, check if there is a non-revoked service contract or an
unanswered request. | protected int | getDesiredNumberOfProviders(Role role) | protected IncrementalSubscription | getMMRequestSubscription() | protected String | getMinimumEchelon(Role role) | protected NonOverlappingTimeSpanSet | getOPCONSchedule() | protected TimeSpan | getOPCONTimeSpan() | protected Set | getOplanStages(Task task) | String | getPrefs(Collection prefs) | protected Role | getRole(ServiceDescription serviceDescription) | protected Asset | getSelfOrg() | protected long | getWarningCutoffTime() | protected boolean | handleChangedLineage() | protected void | handleChangedServiceContractRelays(Collection changedRelays) | protected void | handleRequestWithNoRemainingProviderOption(Role role, TimeSpan currentInterval) | protected void | initializeNumberOfProvidersPerRole() | protected boolean | matchingRequest(MMQueryRequest request, Role role, TimeSpan timeSpan, ServiceInfoScorer scorer) | protected boolean | needToFindProviders() | protected Collection | parseRoleParams() | protected void | queryServices(Role role) | protected void | queryServices(Role role, TimeSpan timeSpan) | protected void | queryServices(Role role, ServiceInfoScorer scorer, TimeSpan timeSpan) | protected Collection | reorderAnyTiedServiceDescriptions(ArrayList scoredServiceDescriptions) | protected void | requestServiceContract(ServiceDescription serviceDescription, TimeSpan interval) create & publish a relay with service request to the provider specified in
the serviceDescription for the specified time interval. | protected void | requestServiceContract(Role role, String providerName, TimeSpan interval) | protected boolean | requested(Role role, TimeSpan timeSpan) | protected void | resetWarningCutoffTime() | protected void | setNeedToFindProviders(boolean flag) | protected void | setOPCONSchedule(NonOverlappingTimeSpanSet opconSchedule) | protected void | setupSubscriptions() | public void | verifyOutstandingRequests(TimeSpanSet currentOPCONSchedule) | public void | verifyServiceContracts(TimeSpanSet currentOPCONSchedule) |
alreadyAskedForContractWithProvider | protected boolean alreadyAskedForContractWithProvider(Role role, String providerName, TimeSpan timeSpan)(Code) | | return true if you already have a service contract relay with this
provider
|
checkProviderCompletelyCovered | protected boolean checkProviderCompletelyCovered(Role role, TimeSpan timeSpan)(Code) | | return true if you have a non-revoked service contract for
this role or if you have an unanswered request
|
checkProviderCompletelyRequested | protected boolean checkProviderCompletelyRequested(Role role, TimeSpan timeSpan)(Code) | | return true if you have a non-revoked service contract for
this role or if you have an unanswered request
|
execute | public void execute()(Code) | | |
findProviders | protected void findProviders()(Code) | | |
generateServiceRequests | protected void generateServiceRequests(Collection mmRequests)(Code) | | For each answered request, pick an appropriate provider
and send them a service request.
Note that input is the changed service requests only.
Also need HashMap of number of providers desired for each role.
|
getCurrentlyUncoveredIntervalsWithoutOutstandingRequests | protected Collection getCurrentlyUncoveredIntervalsWithoutOutstandingRequests(long desiredStart, long desiredEnd, Role role)(Code) | | For this role, check if there is a non-revoked service contract or an
unanswered request. If so, return an empty collection. If not, return
a collection containing the time interval between desiredStart and
desiredEnd.
|
getDesiredNumberOfProviders | protected int getDesiredNumberOfProviders(Role role)(Code) | | |
getWarningCutoffTime | protected long getWarningCutoffTime()(Code) | | |
handleChangedLineage | protected boolean handleChangedLineage()(Code) | | |
handleChangedServiceContractRelays | protected void handleChangedServiceContractRelays(Collection changedRelays)(Code) | | If a changed relay is revoked and you are the client, do a new
service query for this role
|
handleRequestWithNoRemainingProviderOption | protected void handleRequestWithNoRemainingProviderOption(Role role, TimeSpan currentInterval)(Code) | | Log a warning that you couldn't find a provider for this option
|
initializeNumberOfProvidersPerRole | protected void initializeNumberOfProvidersPerRole()(Code) | | |
needToFindProviders | protected boolean needToFindProviders()(Code) | | |
queryServices | protected void queryServices(Role role)(Code) | | |
queryServices | protected void queryServices(Role role, TimeSpan timeSpan)(Code) | | create and publish a MMQueryRequest for this role
|
reorderAnyTiedServiceDescriptions | protected Collection reorderAnyTiedServiceDescriptions(ArrayList scoredServiceDescriptions)(Code) | | Modify the order of scoredServiceDescriptions so that ties are in the
order you want them to be
|
requestServiceContract | protected void requestServiceContract(ServiceDescription serviceDescription, TimeSpan interval)(Code) | | create & publish a relay with service request to the provider specified in
the serviceDescription for the specified time interval.
|
resetWarningCutoffTime | protected void resetWarningCutoffTime()(Code) | | |
setNeedToFindProviders | protected void setNeedToFindProviders(boolean flag)(Code) | | |
setupSubscriptions | protected void setupSubscriptions()(Code) | | |
verifyOutstandingRequests | public void verifyOutstandingRequests(TimeSpanSet currentOPCONSchedule)(Code) | | |
verifyServiceContracts | public void verifyServiceContracts(TimeSpanSet currentOPCONSchedule)(Code) | | |
|
|