Package org.apache.tapestry5.mongodb.modules

## Class MongodbModule

- java.lang.Object
- - org.apache.tapestry5.mongodb.modules.MongodbModule

-     public class MongodbModule
      extends Object

  Defines services which are responsible for MongoDB initializations and connections.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MongodbModule()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `bind​(ServiceBinder binder)` |
    `static MongoDB` | `buildMongoDB​(org.slf4j.Logger logger, MongoDBSource mongoDBSource, PerthreadManager perthreadManager, String defaultDbName, boolean consistentRequest, boolean secureMode, String dbUsername, String dbPassword)` |
    `static void` | `contributeFactoryDefaults​(MappedConfiguration<String,​String> configuration)` |
    `static void` | `contributeTypeCoercer​(MappedConfiguration<CoercionTuple.Key,​CoercionTuple> configuration)` | Contribute coercions for `WriteConcern` and `ReadPreference` to have them from `Symbol`

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

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

- - ### Constructor Detail

    - #### MongodbModule

          public MongodbModule()

  - ### Method Detail

    - #### bind

          public static void bind​(ServiceBinder binder)

    - #### contributeFactoryDefaults

          public static void contributeFactoryDefaults​(MappedConfiguration<String,​String> configuration)

    - #### buildMongoDB

          @Scope("perthread")
          public static MongoDB buildMongoDB​(org.slf4j.Logger logger,
                                             MongoDBSource mongoDBSource,
                                             PerthreadManager perthreadManager,
                                             @Symbol("tapestry.mongodb.default_db_name")
                                             String defaultDbName,
                                             @Symbol("tapestry.mongodb.consistent_request")
                                             boolean consistentRequest,
                                             @Symbol("tapestry.mongodb.secure_mode")
                                             boolean secureMode,
                                             @Symbol("tapestry.mongodb.db_username")
                                             String dbUsername,
                                             @Symbol("tapestry.mongodb.db_password")
                                             String dbPassword)

    - #### contributeTypeCoercer

          public static void contributeTypeCoercer​(MappedConfiguration<CoercionTuple.Key,​CoercionTuple> configuration)

      Contribute coercions for `WriteConcern` and `ReadPreference` to have them from `Symbol`
      Parameters:
        `configuration` - lets help the `TypeCoercer` service