package geniusweb.party; import geniusweb.actions.Action; import geniusweb.connection.Connectable; import geniusweb.inform.Inform; /** * This is a interface definition for java-based party implementations that are * to be run on the PartiesServer. * * To implement a party to run on the PartiesServer, you must implement this and * also have a 0-arg constructor. Also we strongly recommend not to use any * static code blocks or do anything serious in the constructor. Instances of * your class may also be created only to call the getCapabilities function. * *

* Technical details: normally a Party will be spawned inside a PartiesFactory, * and incoming/outgoing calls are routed through a websocket there. * */ public interface Party extends Connectable { /** * @return the capabilities of this party. */ Capabilities getCapabilities(); /** * * @return some useful short description, eg "tit-for-tat with bayesian * opponent modeling". */ String getDescription(); /** * When this is called, the party should free up its resources and terminate * its threads. This call may come in at any time, eg when a negotiation is * aborted. */ void terminate(); }