Class VavrBundle<T extends io.dropwizard.core.Configuration>

java.lang.Object
io.dropwizard.vavr.VavrBundle<T>
All Implemented Interfaces:
io.dropwizard.core.ConfiguredBundle<T>

public class VavrBundle<T extends io.dropwizard.core.Configuration> extends Object implements io.dropwizard.core.ConfiguredBundle<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Add Vavr support (Jackson, Jersey) to Dropwizard.
    VavrBundle(boolean registerMessageBodyWriters)
    Add Vavr support (Jackson, Jersey) to Dropwizard.
    VavrBundle(io.vavr.jackson.datatype.VavrModule.Settings settings, boolean registerMessageBodyWriters)
    Add Vavr support (Jackson, Jersey) to Dropwizard.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap)
     
    protected org.hibernate.validator.HibernateValidatorConfiguration
    Creates a new HibernateValidatorConfiguration with all the custom ValueExtractor registered.
    protected jakarta.validation.ValidatorFactory
    Creates a new ValidatorFactory based on newValidatorConfiguration()
    void
    run(T configuration, io.dropwizard.core.setup.Environment environment)
     

    Methods inherited from class java.lang.Object

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

    • VavrBundle

      public VavrBundle()
      Add Vavr support (Jackson, Jersey) to Dropwizard.
    • VavrBundle

      public VavrBundle(boolean registerMessageBodyWriters)
      Add Vavr support (Jackson, Jersey) to Dropwizard.
      Parameters:
      registerMessageBodyWriters - Register EitherMessageBodyWriter and ValueMessageBodyWriter in ObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such as Either, Option, and Lazy with Jackson. Use with care!
    • VavrBundle

      public VavrBundle(io.vavr.jackson.datatype.VavrModule.Settings settings, boolean registerMessageBodyWriters)
      Add Vavr support (Jackson, Jersey) to Dropwizard.
      Parameters:
      settings - Settings for Jackson VavrModule
      registerMessageBodyWriters - Register EitherMessageBodyWriter and ValueMessageBodyWriter in ObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such as Either, Option, and Lazy with Jackson. Use with care!
  • Method Details

    • initialize

      public void initialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap)
      Specified by:
      initialize in interface io.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
    • run

      public void run(T configuration, io.dropwizard.core.setup.Environment environment)
      Specified by:
      run in interface io.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
    • newValidatorFactory

      protected jakarta.validation.ValidatorFactory newValidatorFactory()
      Creates a new ValidatorFactory based on newValidatorConfiguration()
    • newValidatorConfiguration

      protected org.hibernate.validator.HibernateValidatorConfiguration newValidatorConfiguration()
      Creates a new HibernateValidatorConfiguration with all the custom ValueExtractor registered.