io.micronaut.context.event.ApplicationEventPublisher Java Examples

The following examples show how to use io.micronaut.context.event.ApplicationEventPublisher. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GrpcEmbeddedServer.java    From micronaut-grpc with Apache License 2.0 6 votes vote down vote up
/**
 * Default constructor.
 * @param applicationContext The application context
 * @param applicationConfiguration The application configuration
 * @param grpcServerConfiguration The GRPC server configuration
 * @param serverBuilder The server builder
 * @param eventPublisher The event publisher
 * @param computeInstanceMetadataResolver The computed instance metadata
 * @param metadataContributors The metadata contributors
 */
@Internal
GrpcEmbeddedServer(
        @Nonnull ApplicationContext applicationContext,
        @Nonnull ApplicationConfiguration applicationConfiguration,
        @Nonnull GrpcServerConfiguration grpcServerConfiguration,
        @Nonnull ServerBuilder<?> serverBuilder,
        @Nonnull ApplicationEventPublisher eventPublisher,
        @Nullable ComputeInstanceMetadataResolver computeInstanceMetadataResolver,
        @Nullable List<ServiceInstanceMetadataContributor> metadataContributors) {
    ArgumentUtils.requireNonNull("applicationContext", applicationContext);
    ArgumentUtils.requireNonNull("applicationConfiguration", applicationConfiguration);
    ArgumentUtils.requireNonNull("grpcServerConfiguration", grpcServerConfiguration);
    this.applicationContext = applicationContext;
    this.configuration = applicationConfiguration;
    this.grpcConfiguration = grpcServerConfiguration;
    this.eventPublisher = eventPublisher;
    this.server = serverBuilder.build();
    this.computeInstanceMetadataResolver = computeInstanceMetadataResolver;
    this.metadataContributors = metadataContributors;
}
 
Example #2
Source File: GrpcEmbeddedServer.java    From micronaut-grpc with Apache License 2.0 6 votes vote down vote up
/**
 * Default constructor.
 * @param applicationContext The application context
 * @param applicationConfiguration The application configuration
 * @param grpcServerConfiguration The GRPC server configuration
 * @param serverBuilder The server builder
 * @param eventPublisher The event publisher
 * @param computeInstanceMetadataResolver The computed instance metadata
 * @param metadataContributors The metadata contributors
 */
@Internal
GrpcEmbeddedServer(
        @Nonnull ApplicationContext applicationContext,
        @Nonnull ApplicationConfiguration applicationConfiguration,
        @Nonnull GrpcServerConfiguration grpcServerConfiguration,
        @Nonnull ServerBuilder<?> serverBuilder,
        @Nonnull ApplicationEventPublisher eventPublisher,
        @Nullable ComputeInstanceMetadataResolver computeInstanceMetadataResolver,
        @Nullable List<ServiceInstanceMetadataContributor> metadataContributors) {
    ArgumentUtils.requireNonNull("applicationContext", applicationContext);
    ArgumentUtils.requireNonNull("applicationConfiguration", applicationConfiguration);
    ArgumentUtils.requireNonNull("grpcServerConfiguration", grpcServerConfiguration);
    this.applicationContext = applicationContext;
    this.configuration = applicationConfiguration;
    this.grpcConfiguration = grpcServerConfiguration;
    this.eventPublisher = eventPublisher;
    this.server = serverBuilder.build();
    this.computeInstanceMetadataResolver = computeInstanceMetadataResolver;
    this.metadataContributors = metadataContributors;
}
 
Example #3
Source File: DataSourceMigrationRunner.java    From micronaut-flyway with Apache License 2.0 5 votes vote down vote up
/**
 * @param applicationContext The application context
 * @param eventPublisher     The event publisher
 * @param dataSourceResolver The data source resolver
 */
public DataSourceMigrationRunner(ApplicationContext applicationContext,
                                 ApplicationEventPublisher eventPublisher,
                                 @Nullable DataSourceResolver dataSourceResolver) {
    super(applicationContext, eventPublisher);
    this.dataSourceResolver = dataSourceResolver != null ? dataSourceResolver : DataSourceResolver.DEFAULT;
}
 
Example #4
Source File: BookManager.java    From micronaut-data with Apache License 2.0 4 votes vote down vote up
public BookManager(BookRepository bookRepository, ApplicationEventPublisher eventPublisher) { // <1>
    this.bookRepository = bookRepository;
    this.eventPublisher = eventPublisher;
}
 
Example #5
Source File: AlternativeMigrationRunner.java    From micronaut-flyway with Apache License 2.0 4 votes vote down vote up
/**
 * @param applicationContext The application context
 * @param eventPublisher     The event publisher
 */
public AlternativeMigrationRunner(ApplicationContext applicationContext,
                                  ApplicationEventPublisher eventPublisher) {
    super(applicationContext, eventPublisher);
}
 
Example #6
Source File: GormMigrationRunner.java    From micronaut-flyway with Apache License 2.0 4 votes vote down vote up
/**
 * @param applicationContext The application context
 * @param eventPublisher     The event publisher
 */
GormMigrationRunner(ApplicationContext applicationContext,
                    ApplicationEventPublisher eventPublisher) {
    super(applicationContext, eventPublisher);
}
 
Example #7
Source File: AbstractFlywayMigration.java    From micronaut-flyway with Apache License 2.0 4 votes vote down vote up
/**
 * @param applicationContext The application context
 * @param eventPublisher     The event publisher
 */
AbstractFlywayMigration(ApplicationContext applicationContext, ApplicationEventPublisher eventPublisher) {
    this.applicationContext = applicationContext;
    this.eventPublisher = eventPublisher;
}
 
Example #8
Source File: KafkaStreamsFactory.java    From micronaut-kafka with Apache License 2.0 2 votes vote down vote up
/**
 * Default constructor.
 *
 * @param eventPublisher The event publisher
 */
public KafkaStreamsFactory(ApplicationEventPublisher eventPublisher) {
    this.eventPublisher = eventPublisher;
}
 
Example #9
Source File: ContextEventAdapter.java    From micronaut-spring with Apache License 2.0 2 votes vote down vote up
/**
 * Default constructor.
 * @param applicationContext The app context
 * @param eventPublisher The event publisher
 */
ContextEventAdapter(MicronautApplicationContext applicationContext, ApplicationEventPublisher eventPublisher) {
    this.eventPublisher = eventPublisher;
    this.applicationContext = applicationContext;
}