Package com.tnsai.coordination
Interface MultiRoundContractNet.ProposalRequester
- Enclosing class:
MultiRoundContractNet
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Source of contractor proposals. The protocol cannot reach contractors
on its own — callers supply the messaging mechanism (TAN-5893).
The protocol stops waiting after
timeout; implementations should
also apply that cap to their transport and respond to interruption so
timed-out work is released promptly.- Since:
- 0.15.0
-
Method Summary
Modifier and TypeMethodDescriptionrequest(com.tnsai.agents.Agent contractor, MultiRoundContractNet.NegotiationTask task, int round, double targetScore, Duration timeout) Requests a proposal from a contractor.
-
Method Details
-
request
Proposal request(com.tnsai.agents.Agent contractor, MultiRoundContractNet.NegotiationTask task, int round, double targetScore, Duration timeout) Requests a proposal from a contractor.- Parameters:
contractor- the contractor agent to asktask- the task being negotiatedround- current negotiation round (1-based)targetScore- score the manager is aiming for this round (Double.MAX_VALUEin round 1)timeout- maximum time to wait for the answer- Returns:
- the contractor's proposal, or
nullto decline. The proposal must carrytask's id andcontractor's id; a proposal naming a different task or contractor is dropped with a warning and never reaches the award decision.
-