Ignore:
Timestamp:
01/17/10 18:30:55 (2 years ago)
Author:
octorian
Message:

Addition of ConnectionFactory implementation for 5.0 (#146)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LogicMail/src/org/logicprobe/LogicMail/util/Connection.java

    r608 r614  
    119119    private static final byte[] CRLF = new byte[] { 13, 10 }; 
    120120 
    121     private static UtilFactory connectionFactory; 
     121    private UtilFactory utilFactory; 
    122122    protected String serverName; 
    123123    protected int serverPort; 
     
    151151    protected Connection(ConnectionConfig connectionConfig) { 
    152152        this.globalConfig = MailSettings.getInstance().getGlobalConfig(); 
     153        this.utilFactory = UtilFactory.getInstance(); 
    153154         
    154155        this.serverName = connectionConfig.getServerName(); 
     
    195196        this.socket = null; 
    196197    } 
    197  
    198     /** 
    199      * Sets the connection factory reference. 
    200      *  
    201      * @param connectionFactory connection factory reference 
    202      */ 
    203     static void setConnectionFactory(UtilFactory connectionFactory) { 
    204         Connection.connectionFactory = connectionFactory; 
    205     } 
    206198     
    207199    /** 
     
    213205        } 
    214206         
    215         connectionFactory.addOpenConnection(this); 
     207        utilFactory.addOpenConnection(this); 
    216208 
    217209        socket = openStreamConnection(); 
     
    277269        } 
    278270 
    279         connectionFactory.removeOpenConnection(this); 
     271        utilFactory.removeOpenConnection(this); 
    280272 
    281273        EventLogger.logEvent(AppInfo.GUID, "Connection closed".getBytes(), 
Note: See TracChangeset for help on using the changeset viewer.