
com.gruelbox.transactionoutbox.guice.GuiceInstantiator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transactionoutbox-guice Show documentation
Show all versions of transactionoutbox-guice Show documentation
A safe implementation of the transactional outbox pattern for Java (Guice extension library)
package com.gruelbox.transactionoutbox.guice;
import com.google.inject.Injector;
import com.gruelbox.transactionoutbox.spi.AbstractFullyQualifiedNameInstantiator;
import lombok.experimental.SuperBuilder;
/** Instantiator that uses the Guice {@link Injector} to source objects. */
@SuperBuilder
public class GuiceInstantiator extends AbstractFullyQualifiedNameInstantiator {
private final Injector injector;
@Override
protected Object createInstance(Class> clazz) {
return injector.getInstance(clazz);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy