Class SharedElementModule

java.lang.Object
com.google.inject.PrivateModule
dev.getelements.elements.sdk.guice.SharedElementModule
All Implemented Interfaces:
com.google.inject.Module
Direct Known Subclasses:
AppNodeServicesModule, MongoDaoElementModule, ServicesElementModule

public class SharedElementModule extends com.google.inject.PrivateModule
Defines a new Element which is sourced from the guice bindings visible to the module at the time the injector was created. This also assumes there exists an ElementRegistry named ElementRegistry.ROOT which will be the parent of the newly created ElementRegistry. In addition to the ElementLoader specified in the constructor of this module, it is possible to specify additional Element instances to load within the same ElementLoader.
  • Constructor Details

    • SharedElementModule

      public SharedElementModule(String packageName)
    • SharedElementModule

      public SharedElementModule(Package aPackage)
  • Method Details

    • configure

      protected final void configure()
      Specified by:
      configure in class com.google.inject.PrivateModule
    • configureElement

      protected void configureElement()
      Configures the Element which will be used in this SharedElementModule.
    • configureElement

      protected void configureElement(com.google.inject.Scope thredLocalScope)
      Configures the Element which will be used in this SharedElementModule.
      Parameters:
      thredLocalScope - the thread local scope for the Element