org.qi4j.library.sql.assembly

## Class DataSourceAssembler

- java.lang.Object
- - org.qi4j.bootstrap.Assemblers.VisibilityIdentity<DataSourceAssembler>
  - - org.qi4j.library.sql.assembly.DataSourceAssembler

- All Implemented Interfaces:
    Assembler, Assemblers.Identifiable<DataSourceAssembler>, Assemblers.Visible<DataSourceAssembler>

      public class DataSourceAssembler
      extends Assemblers.VisibilityIdentity<DataSourceAssembler>

  Use this Assembler to register a javax.sql.DataSource.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_DATASOURCE_IDENTITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataSourceAssembler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assemble(ModuleAssembly module)` Assemblers receive a callback to the ModuleAssembly they are supposed to configure.
    `DataSourceAssembler` | `withCircuitBreaker()`
    `DataSourceAssembler` | `withCircuitBreaker(CircuitBreaker circuitBreaker)`
    `DataSourceAssembler` | `withDataSourceServiceIdentity(String dataSourceServiceId)`

    - ### Methods inherited from class org.qi4j.bootstrap.Assemblers.VisibilityIdentity

      `hasIdentity, identifiedBy, identity, visibility, visibleIn`

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

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

- - ### Field Detail

    - #### DEFAULT_DATASOURCE_IDENTITY

          public static String DEFAULT_DATASOURCE_IDENTITY

  - ### Constructor Detail

    - #### DataSourceAssembler

          public DataSourceAssembler()

  - ### Method Detail

    - #### withDataSourceServiceIdentity

          public DataSourceAssembler withDataSourceServiceIdentity(String dataSourceServiceId)

    - #### withCircuitBreaker

          public DataSourceAssembler withCircuitBreaker()

    - #### withCircuitBreaker

          public DataSourceAssembler withCircuitBreaker(CircuitBreaker circuitBreaker)

    - #### assemble

          public void assemble(ModuleAssembly module)
                        throws AssemblyException

      Description copied from interface: `Assembler`
      Assemblers receive a callback to the ModuleAssembly they are supposed to configure. They can use this to register objects, composites, services etc. and the additional metadata that may exist for these artifacts.

      An Assembler may create new Modules by calling `ModuleAssembly.layer()` and then `LayerAssembly.module(String)` (String)}. This allows an Assembler to bootstrap an entire Layer with more Modules.

      Parameters:
        `module` - the Module to assemble
      Throws:
        `AssemblyException` - thrown if the assembler tries to do something illegal