source: geniuswebcore/geniusweb/protocol/partyconnection/ProtocolToPartyConnFactory.py@ 81

Last change on this file since 81 was 81, checked in by Bart Vastenhouw, 2 years ago

Added python timedependent parties (conceder, hardliner, etc)

File size: 1.2 KB
Line 
1from abc import abstractmethod
2from typing import List
3
4from geniusweb.actions.Action import Action
5from geniusweb.connection.ConnectionFactory import ConnectionFactory
6from geniusweb.inform.Inform import Inform
7from geniusweb.protocol.partyconnection.ProtocolToPartyConn import ProtocolToPartyConn
8from geniusweb.references.Reference import Reference
9
10
11class ProtocolToPartyConnFactory(ConnectionFactory[Action, Inform] ):
12 '''
13 An extended {@link ConnectionFactory} that store PartyIDs with the
14 connections, making it possible to find back the appropriate connection given
15 a PartyID. Also, it allows the connection factory to actually assign the
16 PartyIDs.
17 '''
18
19 @abstractmethod
20 def connectAll(self, references: List[Reference] ) -> List[ProtocolToPartyConn]:
21 '''
22 Connects a set of References in one go, following a modified Banker's
23 algorthm.
24
25 @param references the list of references to connect with
26 @return a List of connections, one fore each Reference.
27 @throws ConnectionError if a connection is failing irrecoverably.
28 @throws NoResourcesNowException is there are insufficient resources now.
29 This also includes a suggested moment to
30 retry.
31 '''
32
Note: See TracBrowser for help on using the repository browser.