Class Module.ModuleBuilder<T extends Module>

java.lang.Object
io.inverno.core.v1.Module.ModuleBuilder<T>
Type Parameters:
T - the module type to build.
Direct Known Subclasses:
Base.Builder, Boot.Builder, Client.Builder, Jose.Builder, Ldap.Builder, Lettuce.Builder, Server.Builder, Server.Builder, Vertx.Builder
Enclosing class:
Module

protected abstract static class Module.ModuleBuilder<T extends Module> extends Object

The Module Builder base class.

All module have to be built by a builder.

Since:
1.0
Author:
Jeremy Kuhn
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModuleBuilder(Object... nonOptionalSockets)
    Creates a new Module Builder.
  • Method Summary

    Modifier and Type
    Method
    Description
    final T
    Builds the module.
    protected abstract T
    This method should be implemented by concrete implementation to return the actual module instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModuleBuilder

      public ModuleBuilder(Object... nonOptionalSockets) throws IllegalArgumentException

      Creates a new Module Builder.

      Parameters:
      nonOptionalSockets - an even list of non-optional sockets pairs (name, value) required to build the module
      Throws:
      IllegalArgumentException - if one or more non-optional sockets are null
  • Method Details

    • build

      public final T build()

      Builds the module.

      This method actually delegates the actual module creation to the doBuild() method.

      Returns:
      a new module instance
    • doBuild

      protected abstract T doBuild()

      This method should be implemented by concrete implementation to return the actual module instance.

      Returns:
      a new module instance