Last change
on this file since 26 was 26, checked in by bart, 4 years ago |
Voting requests now contain Offers. Fixed windows whitespace issue. Partiesserver now supports up to 8 parties simultaneously.
|
File size:
1.2 KB
|
Rev | Line | |
---|
[26] | 1 | package geniusweb.party;
|
---|
| 2 |
|
---|
| 3 | import geniusweb.actions.Action;
|
---|
| 4 | import geniusweb.connection.Connectable;
|
---|
| 5 | import geniusweb.inform.Inform;
|
---|
| 6 |
|
---|
| 7 | /**
|
---|
| 8 | * This is a interface definition for java-based party implementations that are
|
---|
| 9 | * to be run on the PartiesServer.
|
---|
| 10 | *
|
---|
| 11 | * To implement a party to run on the PartiesServer, you must implement this and
|
---|
| 12 | * also have a 0-arg constructor. Also we strongly recommend not to use any
|
---|
| 13 | * static code blocks or do anything serious in the constructor. Instances of
|
---|
| 14 | * your class may also be created only to call the getCapabilities function.
|
---|
| 15 | *
|
---|
| 16 | * <p>
|
---|
| 17 | * Technical details: normally a Party will be spawned inside a PartiesFactory,
|
---|
| 18 | * and incoming/outgoing calls are routed through a websocket there.
|
---|
| 19 | *
|
---|
| 20 | */
|
---|
| 21 | public interface Party extends Connectable<Inform, Action> {
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * @return the capabilities of this party.
|
---|
| 25 | */
|
---|
| 26 | Capabilities getCapabilities();
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | *
|
---|
| 30 | * @return some useful short description, eg "tit-for-tat with bayesian
|
---|
| 31 | * opponent modeling".
|
---|
| 32 | */
|
---|
| 33 | String getDescription();
|
---|
| 34 |
|
---|
| 35 | /**
|
---|
| 36 | * When this is called, the party should free up its resources and terminate
|
---|
| 37 | * its threads. This call may come in at any time, eg when a negotiation is
|
---|
| 38 | * aborted.
|
---|
| 39 | */
|
---|
| 40 | void terminate();
|
---|
| 41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.