Class AuctionAdapter

java.lang.Object
com.tnsai.coordination.negotiation.adapter.AuctionAdapter
All Implemented Interfaces:
NegotiationProtocol

public final class AuctionAdapter extends Object implements NegotiationProtocol
Adapter that wraps the existing Auction as a NegotiationProtocol.

Maps Coordination.NegotiationType auction variants to Auction.Type and converts AuctionResult to NegotiationOutcome.

Since:
0.0.2
  • Constructor Details

    • AuctionAdapter

      public AuctionAdapter()
    • AuctionAdapter

      public AuctionAdapter(BidStrategy bidStrategy)
  • Method Details

    • negotiate

      public NegotiationOutcome negotiate(List<com.tnsai.agents.Agent> parties, NegotiationConfig config)
      Description copied from interface: NegotiationProtocol
      Executes the negotiation between the given parties.
      Specified by:
      negotiate in interface NegotiationProtocol
      Parameters:
      parties - the agents participating in negotiation
      config - negotiation configuration
      Returns:
      the negotiation outcome
    • getType

      public com.tnsai.annotations.Coordination.NegotiationType getType()
      Description copied from interface: NegotiationProtocol
      Returns the negotiation type this protocol handles.
      Specified by:
      getType in interface NegotiationProtocol
      Returns:
      the supported negotiation type
    • setBidStrategy

      public void setBidStrategy(BidStrategy bidStrategy)
      Sets the bid strategy used for auction execution.