Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Generate Event Publishers #554

Merged
merged 16 commits into from
May 2, 2024
Prev Previous commit
Next Next commit
format javadoc only
rbygrave committed May 2, 2024
commit be5f544b5128ace05e028c6a1f76ef59e57a0e3d
10 changes: 5 additions & 5 deletions inject/src/main/java/io/avaje/inject/event/ObserverManager.java
Original file line number Diff line number Diff line change
@@ -5,24 +5,24 @@

/**
* Manages all {@link Observer} instances in the BeanScope.
*
* <p>A default implementation is provided by avaje-inject.
* <p>
* A default implementation is provided by avaje-inject.
*/
public interface ObserverManager {

/**
* Registers the given Consumer as an observer.
*
* @param <T> the type of the event
* @param <T> the type of the event
* @param eventType the type of the event ()
* @param observer the consumer to execute when a matching event is found
* @param observer the consumer to execute when a matching event is found
*/
<T> void registerObserver(Type eventType, Observer<T> observer);

/**
* Retrieves a list of all Observers registered by the given type
*
* @param <T> the Type of the Event
* @param <T> the Type of the Event
* @param eventType the type of the event
* @return all observers registered
*/
4 changes: 3 additions & 1 deletion inject/src/main/java/io/avaje/inject/spi/Builder.java
Original file line number Diff line number Diff line change
@@ -76,7 +76,9 @@ static Builder newBuilder(Set<String> profiles, PropertyRequiresPlugin plugin, L
*/
<T> void registerProvider(Provider<T> provider);

/** Register the observer into the context. */
/**
* Register the observer into the context.
*/
<T> void registerObserver(Type type, int priority, boolean async, Consumer<T> observer, String qualifier);

/**