Changeset 7 for src/main/java/geniusweb/runserver
- Timestamp:
- 11/28/19 14:41:17 (5 years ago)
- Location:
- src/main/java/geniusweb/runserver
- Files:
-
- 1 added
- 2 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 } -
src/main/java/geniusweb/runserver/RunningNegotiationsRepo.java
r1 r7 55 55 } 56 56 negotiations.put(entity.getID(), entity); 57 notify Change(entity.getID());57 notifyListeners(entity.getID()); 58 58 log.log(Level.FINEST, "started " + entity.getID()); 59 59 } … … 62 62 public void remove(String id) { 63 63 negotiations.remove(id); 64 notify Change(id);64 notifyListeners(id); 65 65 log.log(Level.FINEST, "stopped negotiation " + id); 66 66 } … … 73 73 } 74 74 negotiations.put(entity.getID(), entity); 75 notify Change(entity.getID());75 notifyListeners(entity.getID()); 76 76 log.log(Level.FINEST, "replaced " + entity.getID()); 77 77
Note:
See TracChangeset
for help on using the changeset viewer.