source: src/main/java/onetomany/bargainingchipsgame/players/BilateralAgent.java@ 278

Last change on this file since 278 was 278, checked in by Tim Baarslag, 5 years ago

BlockingQueue<CoordinationMessage> and BlockingQueue<NegotiationStatusMessage>

File size: 740 bytes
RevLine 
[269]1package onetomany.bargainingchipsgame.players;
2
3import java.util.concurrent.BlockingQueue;
4
5import onetomany.bargainingchipsgame.interactions.Offer;
6
[273]7public abstract class BilateralAgent implements Runnable
[269]8{
[273]9 String name;
[278]10 // Messaging from and to the opponent
11 protected BlockingQueue<Offer> in;
12 protected BlockingQueue<Offer> out;
[269]13
[278]14 protected abstract void receiveOffer(Offer bundle);
[274]15
16 protected abstract Offer sendOffer();
17
18 protected abstract Offer sendOpeningOffer();
19
[273]20 public BilateralAgent(String name, BlockingQueue<Offer> in, BlockingQueue<Offer> out)
[269]21 {
22 super();
[273]23 this.name = name;
[269]24 this.in = in;
[273]25 this.out = out;
[269]26 }
27
[278]28 @Override
[274]29 public String toString()
30 {
31 return name;
32 }
33
[269]34}
Note: See TracBrowser for help on using the repository browser.