source: protocol/src/main/java/geniusweb/protocol/partyconnection/ProtocolToPartyConnFactory.java@ 34

Last change on this file since 34 was 34, checked in by bart, 3 years ago

Added SAOP and simplerunner to GeniusWebPython. Several minor fixes.

File size: 1.3 KB
Line 
1package geniusweb.protocol.partyconnection;
2
3import java.io.IOException;
4import java.util.List;
5
6import geniusweb.actions.Action;
7import geniusweb.connection.ConnectionFactory;
8import geniusweb.inform.Inform;
9import geniusweb.references.Reference;
10import tudelft.utilities.repository.NoResourcesNowException;
11
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 */
19public interface ProtocolToPartyConnFactory
20 extends ConnectionFactory<Action, Inform> {
21 @Override
22 public ProtocolToPartyConn connect(Reference reference)
23 throws IOException, NoResourcesNowException;
24
25 /**
26 * Connects a set of References in one go, following a modified Banker's
27 * algorthm.
28 *
29 * @param references the list of references to connect with
30 * @return a List of connections, one fore each Reference.
31 * @throws IOException if a connection is failing irrecoverably.
32 * @throws NoResourcesNowException is there are insufficient resources now.
33 * This also includes a suggested moment to
34 * retry.
35 */
36 List<ProtocolToPartyConn> connect(List<Reference> references)
37 throws IOException, NoResourcesNowException;
38
39}
Note: See TracBrowser for help on using the repository browser.