Changeset 7 for src/main


Ignore:
Timestamp:
11/28/19 14:41:17 (5 years ago)
Author:
bart
Message:

Release 1.1.0

Location:
src/main
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/geniusweb/runserver/PartyConnectionFactory.java

    r1 r7  
    1212import java.util.logging.Level;
    1313
    14 import geniusweb.protocol.partyconnection.ConnectionWithParty;
    15 import geniusweb.protocol.partyconnection.ConnectionWithPartyFactory;
     14import geniusweb.protocol.partyconnection.ProtocolToPartyConn;
     15import geniusweb.protocol.partyconnection.ProtocolToPartyConnFactory;
    1616import geniusweb.references.PartyRef;
    1717import geniusweb.references.Reference;
     
    2323 * following the partiesserver protocols.
    2424 */
    25 class PartyConnectionFactory implements ConnectionWithPartyFactory {
     25class PartyConnectionFactory implements ProtocolToPartyConnFactory {
    2626        private final Reporter log;
    2727
     
    3535
    3636        @Override
    37         public PartyConnection connect(Reference reference)
     37        public WebSocketProtToPartyConn connect(Reference reference)
    3838                        throws IOException, NoResourcesNowException {
    3939                try {
    40                         return new PartyConnection(reference, log).init();
     40                        return new WebSocketProtToPartyConn(reference, log).init();
    4141                } catch (IOException e) {
    4242                        Date date = getWaitingTime(e);
     
    6060
    6161        @Override
    62         public List<ConnectionWithParty> connect(List<Reference> references)
     62        public List<ProtocolToPartyConn> connect(List<Reference> references)
    6363                        throws IOException, NoResourcesNowException {
    6464                /*
     
    7070                 */
    7171                log.log(Level.INFO, "attempting to connect " + references);
    72                 List<ConnectionWithParty> connections = new LinkedList<>();
     72                List<ProtocolToPartyConn> connections = new LinkedList<>();
    7373                try {
    7474                        for (Reference partyref : references) {
    75                                 ConnectionWithParty conn = null;
     75                                ProtocolToPartyConn conn = null;
    7676                                while (conn == null) {
    7777                                        try {
     
    8787                } catch (IOException | NoResourcesNowException e) {
    8888                        // free all already created connections
    89                         for (ConnectionWithParty conn : connections) {
     89                        for (ProtocolToPartyConn conn : connections) {
    9090                                conn.close();
    9191                        }
  • src/main/java/geniusweb/runserver/RunningNegotiationsRepo.java

    r1 r7  
    5555                }
    5656                negotiations.put(entity.getID(), entity);
    57                 notifyChange(entity.getID());
     57                notifyListeners(entity.getID());
    5858                log.log(Level.FINEST, "started " + entity.getID());
    5959        }
     
    6262        public void remove(String id) {
    6363                negotiations.remove(id);
    64                 notifyChange(id);
     64                notifyListeners(id);
    6565                log.log(Level.FINEST, "stopped negotiation " + id);
    6666        }
     
    7373                }
    7474                negotiations.put(entity.getID(), entity);
    75                 notifyChange(entity.getID());
     75                notifyListeners(entity.getID());
    7676                log.log(Level.FINEST, "replaced " + entity.getID());
    7777
  • src/main/webapp/newsession.xhtml

    r6 r7  
    2727        <br /> Domain/Profile Server:
    2828        <input type="url" name="url" id="profilesserverurl"
    29                 value="localhost:8080/profilesserver-1.0.0"
     29                value="localhost:8080/profilesserver-1.1.0"
    3030                pattern=".*:[0-9]+/profilesserver" size="30"
    3131                onchange="connectDomain()"> </input>
     
    4141                <br /> <b>Participants</b> <br /> Parties Server: <input type="url"
    4242                        name="url" id="partiesserverurl"
    43                         value="localhost:8080/partiesserver-1.0.0"
     43                        value="localhost:8080/partiesserver-1.1.0"
    4444                        pattern=".*:[0-9]+/partiesserver" size="30"
    4545                        onchange="connectParties()"> </input> <br /> <br /> <b>Edit
     
    220220         refresh table: copy all parties elements in there.
    221221         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",
    223223                 "capabilities":{"protocols":["SAOP"]},
    224224                 "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",
    226226                 "partyClass":"geniusweb.exampleparties.randomparty.RandomParty"},
    227227                                 ...]
     
    396396        */
    397397        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"
    400400                connectDomain();
    401401                connectParties();
  • src/main/webapp/newtournament.xhtml

    r6 r7  
    4343        <div id="box" class="box">
    4444                <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"
    4646                        pattern=".*:[0-9]+/profilesserver" size="30"
    4747                        onchange="connectDomain()"> </input> <br /> Domain: <select
     
    6969        <div id="box" class="box">
    7070                <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"
    7272                        pattern=".*:[0-9]+/partiesserver" size="30"
    7373                        onchange="connectParties()"> </input> <br /> <br />
     
    390390        */
    391391        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"
    394394
    395395
Note: See TracChangeset for help on using the changeset viewer.