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

Release 1.1.0

File:
1 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                        }
Note: See TracChangeset for help on using the changeset viewer.