Changeset 7 for src/main/java


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

Release 1.1.0

Location:
src/main/java/geniusweb/runserver
Files:
1 added
2 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
Note: See TracChangeset for help on using the changeset viewer.