- Timestamp:
- 11/28/19 14:41:17 (5 years ago)
- Location:
- src/main
- Files:
-
- 1 added
- 4 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 -
src/main/webapp/newsession.xhtml
r6 r7 27 27 <br /> Domain/Profile Server: 28 28 <input type="url" name="url" id="profilesserverurl" 29 value="localhost:8080/profilesserver-1. 0.0"29 value="localhost:8080/profilesserver-1.1.0" 30 30 pattern=".*:[0-9]+/profilesserver" size="30" 31 31 onchange="connectDomain()"> </input> … … 41 41 <br /> <b>Participants</b> <br /> Parties Server: <input type="url" 42 42 name="url" id="partiesserverurl" 43 value="localhost:8080/partiesserver-1. 0.0"43 value="localhost:8080/partiesserver-1.1.0" 44 44 pattern=".*:[0-9]+/partiesserver" size="30" 45 45 onchange="connectParties()"> </input> <br /> <br /> <b>Edit … … 220 220 refresh table: copy all parties elements in there. 221 221 Typically parties is something like 222 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1. 0.0",222 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1.1.0", 223 223 "capabilities":{"protocols":["SAOP"]}, 224 224 "description":"places random bids until it can accept an offer with utility >0.6", 225 "id":"randomparty-1. 0.0",225 "id":"randomparty-1.1.0", 226 226 "partyClass":"geniusweb.exampleparties.randomparty.RandomParty"}, 227 227 ...] … … 396 396 */ 397 397 function init() { 398 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1. 0.0"399 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1. 0.0"398 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.1.0" 399 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.1.0" 400 400 connectDomain(); 401 401 connectParties(); -
src/main/webapp/newtournament.xhtml
r6 r7 43 43 <div id="box" class="box"> 44 44 <br /> Domain/Profile Server: <input type="url" name="url" 45 id="profilesserverurl" value="localhost:8080/profilesserver-1. 0.0"45 id="profilesserverurl" value="localhost:8080/profilesserver-1.1.0" 46 46 pattern=".*:[0-9]+/profilesserver" size="30" 47 47 onchange="connectDomain()"> </input> <br /> Domain: <select … … 69 69 <div id="box" class="box"> 70 70 <br /> Parties Server: <input type="url" name="url" 71 id="partiesserverurl" value="localhost:8080/partiesserver-1. 0.0"71 id="partiesserverurl" value="localhost:8080/partiesserver-1.1.0" 72 72 pattern=".*:[0-9]+/partiesserver" size="30" 73 73 onchange="connectParties()"> </input> <br /> <br /> … … 390 390 */ 391 391 function init() { 392 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1. 0.0"393 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1. 0.0"392 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.1.0" 393 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.1.0" 394 394 395 395
Note:
See TracChangeset
for help on using the changeset viewer.