Skip to content

Commit

Permalink
Details.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Jun 13, 2024
1 parent 384dab2 commit 3b24a93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
import java.lang.annotation.Annotation;
import java.time.Duration;
import java.time.Instant;
import java.util.Arrays;
import java.util.Set;
import java.util.concurrent.*;
import java.util.stream.Collectors;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
Expand Down Expand Up @@ -111,6 +113,10 @@ public AsyncEventServiceProviderImpl.Builder packages(String... eventPackages) {
return eventPackages(Set.of(eventPackages));
}

public AsyncEventServiceProviderImpl.Builder packages(Package... eventPackages) {
return eventPackages(Arrays.stream(eventPackages).map(Package::getName).collect(Collectors.toSet()));
}

public AsyncEventServiceProviderImpl.Builder esperEventAnnotation() {
return eventAnnotations(Set.of(EsperEvent.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import java.lang.annotation.Annotation;
import java.util.*;
import java.util.stream.Collectors;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
Expand Down Expand Up @@ -118,6 +119,10 @@ public Builder packages(String... eventPackages) {
return eventPackages(Set.of(eventPackages));
}

public Builder packages(Package... eventPackages) {
return eventPackages(Arrays.stream(eventPackages).map(Package::getName).collect(Collectors.toSet()));
}

public Builder esperEventAnnotation() {
return eventAnnotations(Set.of(EsperEvent.class));
}
Expand Down

0 comments on commit 3b24a93

Please sign in to comment.