public final class AlertEventPublisher extends Object
AlertEventPublisher
is used to wrap a customized instance of an
AsyncEventBus
that is only used for alerts. In general, Ambari should
have its own application-wide event bus for application events (session
information, state changes, etc), but since alerts can contain many events
being published concurrently, it makes sense to encapsulate a specific alert
bus in this publisher.Constructor and Description |
---|
AlertEventPublisher(Configuration config)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
publish(AlertEvent event)
Publishes the specified event to all registered listeners that
Subscribe to any of the AlertEvent instances. |
void |
register(Object object)
Register a listener to receive events.
|
@Inject public AlertEventPublisher(Configuration config)
public void publish(AlertEvent event)
Subscribe
to any of the AlertEvent
instances.event
- public void register(Object object)
Subscribe
annotation.object
- the listener to receive events.Copyright © 2022 Apache Software Foundation. All rights reserved.