Package io.dropwizard.vavr
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 VavrBundle()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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap)protected org.hibernate.validator.HibernateValidatorConfigurationnewValidatorConfiguration()Creates a newHibernateValidatorConfigurationwith all the customValueExtractorregistered.protected javax.validation.ValidatorFactorynewValidatorFactory()Creates a newValidatorFactorybased onnewValidatorConfiguration()voidrun(T configuration, io.dropwizard.core.setup.Environment environment)
-
-
-
Constructor Detail
-
VavrBundle
public VavrBundle()
Add Vavr support (Jackson, Jersey) to Dropwizard.
-
VavrBundle
public VavrBundle(boolean registerMessageBodyWriters)
Add Vavr support (Jackson, Jersey) to Dropwizard.- Parameters:
registerMessageBodyWriters- RegisterEitherMessageBodyWriterandValueMessageBodyWriterinObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such asEither,Option, andLazywith 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 JacksonVavrModuleregisterMessageBodyWriters- RegisterEitherMessageBodyWriterandValueMessageBodyWriterinObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such asEither,Option, andLazywith Jackson. Use with care!
-
-
Method Detail
-
initialize
public void initialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap)
- Specified by:
initializein interfaceio.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
-
run
public void run(T configuration, io.dropwizard.core.setup.Environment environment)
- Specified by:
runin interfaceio.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
-
newValidatorFactory
protected javax.validation.ValidatorFactory newValidatorFactory()
Creates a newValidatorFactorybased onnewValidatorConfiguration()
-
newValidatorConfiguration
protected org.hibernate.validator.HibernateValidatorConfiguration newValidatorConfiguration()
Creates a newHibernateValidatorConfigurationwith all the customValueExtractorregistered.
-
-