@@ -57,16 +57,16 @@ class Driver {
57
57
/**
58
58
* You should not be calling this directly, instead use {@link driver}.
59
59
* @constructor
60
- * @param {string } url
60
+ * @param {string } hostPort
61
61
* @param {string } userAgent
62
62
* @param {object } token
63
63
* @param {object } config
64
64
* @protected
65
65
*/
66
- constructor ( url , userAgent , token = { } , config = { } ) {
66
+ constructor ( hostPort , userAgent , token = { } , config = { } ) {
67
67
sanitizeConfig ( config ) ;
68
68
69
- this . _url = url ;
69
+ this . _hostPort = hostPort ;
70
70
this . _userAgent = userAgent ;
71
71
this . _openSessions = { } ;
72
72
this . _sessionIdGenerator = 0 ;
@@ -117,13 +117,13 @@ class Driver {
117
117
* @return {Connection } new connector-api session instance, a low level session API.
118
118
* @access private
119
119
*/
120
- _createConnection ( url , release ) {
120
+ _createConnection ( hostPort , release ) {
121
121
let sessionId = this . _sessionIdGenerator ++ ;
122
- let conn = connect ( url , this . _config , this . _connectionErrorCode ( ) ) ;
122
+ let conn = connect ( hostPort , this . _config , this . _connectionErrorCode ( ) ) ;
123
123
let streamObserver = new _ConnectionStreamObserver ( this , conn ) ;
124
124
conn . initialize ( this . _userAgent , this . _token , streamObserver ) ;
125
125
conn . _id = sessionId ;
126
- conn . _release = ( ) => release ( url , conn ) ;
126
+ conn . _release = ( ) => release ( hostPort , conn ) ;
127
127
128
128
this . _openSessions [ sessionId ] = conn ;
129
129
return conn ;
@@ -186,8 +186,8 @@ class Driver {
186
186
}
187
187
188
188
// Extension point
189
- _createConnectionProvider ( address , connectionPool , driverOnErrorCallback ) {
190
- return new DirectConnectionProvider ( address , connectionPool , driverOnErrorCallback ) ;
189
+ _createConnectionProvider ( hostPort , connectionPool , driverOnErrorCallback ) {
190
+ return new DirectConnectionProvider ( hostPort , connectionPool , driverOnErrorCallback ) ;
191
191
}
192
192
193
193
// Extension point
@@ -204,7 +204,7 @@ class Driver {
204
204
_getOrCreateConnectionProvider ( ) {
205
205
if ( ! this . _connectionProvider ) {
206
206
const driverOnErrorCallback = this . _driverOnErrorCallback . bind ( this ) ;
207
- this . _connectionProvider = this . _createConnectionProvider ( this . _url , this . _pool , driverOnErrorCallback ) ;
207
+ this . _connectionProvider = this . _createConnectionProvider ( this . _hostPort , this . _pool , driverOnErrorCallback ) ;
208
208
}
209
209
return this . _connectionProvider ;
210
210
}
0 commit comments