org.apache.jmeter.protocol.mongodb.config

## Class MongoDBHolder

- java.lang.Object
- - org.apache.jmeter.protocol.mongodb.config.MongoDBHolder

-     public final class MongoDBHolder
      extends java.lang.Object

  Public API to access MongoDB `DB` object created by `MongoSourceElement`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoDBHolder()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static com.mongodb.DB` | `getDBFromSource(java.lang.String varName, java.lang.String dbName)` Get access to MongoDB object
    `static com.mongodb.DB` | `getDBFromSource(java.lang.String varName, java.lang.String dbName, java.lang.String login, java.lang.String password)` Get access to MongoDB object

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MongoDBHolder

          public MongoDBHolder()

  - ### Method Detail

    - #### getDBFromSource

          public static com.mongodb.DB getDBFromSource(java.lang.String varName,
                                                       java.lang.String dbName)

      Get access to MongoDB object
      Parameters:
        `varName` - String MongoDB source
        `dbName` - Mongo DB database name
      Returns:
        `DB`

    - #### getDBFromSource

          public static com.mongodb.DB getDBFromSource(java.lang.String varName,
                                                       java.lang.String dbName,
                                                       java.lang.String login,
                                                       java.lang.String password)

      Get access to MongoDB object
      Parameters:
        `varName` - String MongoDB source
        `dbName` - Mongo DB database name
        `login` - name to use for login
        `password` - password to use for login
      Returns:
        `DB`

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.