- Timestamp:
- 11/28/19 14:41:17 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/geniusweb/runserver/PartyConnectionFactory.java
r1 r7 12 12 import java.util.logging.Level; 13 13 14 import geniusweb.protocol.partyconnection. ConnectionWithParty;15 import geniusweb.protocol.partyconnection. ConnectionWithPartyFactory;14 import geniusweb.protocol.partyconnection.ProtocolToPartyConn; 15 import geniusweb.protocol.partyconnection.ProtocolToPartyConnFactory; 16 16 import geniusweb.references.PartyRef; 17 17 import geniusweb.references.Reference; … … 23 23 * following the partiesserver protocols. 24 24 */ 25 class PartyConnectionFactory implements ConnectionWithPartyFactory {25 class PartyConnectionFactory implements ProtocolToPartyConnFactory { 26 26 private final Reporter log; 27 27 … … 35 35 36 36 @Override 37 public PartyConnection connect(Reference reference)37 public WebSocketProtToPartyConn connect(Reference reference) 38 38 throws IOException, NoResourcesNowException { 39 39 try { 40 return new PartyConnection(reference, log).init();40 return new WebSocketProtToPartyConn(reference, log).init(); 41 41 } catch (IOException e) { 42 42 Date date = getWaitingTime(e); … … 60 60 61 61 @Override 62 public List< ConnectionWithParty> connect(List<Reference> references)62 public List<ProtocolToPartyConn> connect(List<Reference> references) 63 63 throws IOException, NoResourcesNowException { 64 64 /* … … 70 70 */ 71 71 log.log(Level.INFO, "attempting to connect " + references); 72 List< ConnectionWithParty> connections = new LinkedList<>();72 List<ProtocolToPartyConn> connections = new LinkedList<>(); 73 73 try { 74 74 for (Reference partyref : references) { 75 ConnectionWithPartyconn = null;75 ProtocolToPartyConn conn = null; 76 76 while (conn == null) { 77 77 try { … … 87 87 } catch (IOException | NoResourcesNowException e) { 88 88 // free all already created connections 89 for ( ConnectionWithPartyconn : connections) {89 for (ProtocolToPartyConn conn : connections) { 90 90 conn.close(); 91 91 }
Note:
See TracChangeset
for help on using the changeset viewer.