Top Description Interfaces Annotations Classes
[default module]

Package com.google.common.eventbus

Annotations
@CheckReturnValue
@ParametersAreNonnullByDefault
Imports
com.google.errorprone.annotations.CheckReturnValue, javax.annotation.ParametersAreNonnullByDefault

Discouraged in favor of dependency injection and concurrency frameworks, EventBus allows publish-subscribe-style communication.

See the Guava User Guide article on EventBus.

Interface Summary

Modifier and TypeInterface and Description
public interface
SubscriberExceptionHandler

Handler for exceptions thrown by event subscribers.

Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
AllowConcurrentEvents

Marks an event subscriber method as being thread-safe.

pack-priv @interface
ElementTypesAreNonnullByDefault

Marks all "top-level" types as non-null in a way that is recognized by Kotlin.

pack-priv @interface
ParametricNullness

Annotates a "top-level" type-variable usage that takes its nullness from the type argument supplied by the user of the class.

public @interface
Subscribe

Marks a method as an event subscriber.

Class Summary

Modifier and TypeClass and Description
public class
AsyncEventBus

An EventBus that takes the Executor of your choice and uses it to dispatch events, allowing dispatch to occur asynchronously.

public class
DeadEvent

Wraps an event that was posted, but which had no subscribers and thus could not be delivered.

pack-priv abstract class
Dispatcher

Handler for dispatching events to subscribers, providing different event ordering guarantees that make sense for different situations.

public class
EventBus

Dispatches events to listeners, and provides ways for listeners to register themselves.

pack-priv class
Subscriber

A subscriber method on a specific object, plus the executor that should be used for dispatching events to it.

public class
SubscriberExceptionContext

Context for an exception thrown by a subscriber.

pack-priv class
SubscriberRegistry

Registry of subscribers to a single event bus.