Package com.google.common.eventbus
Class SubscriberExceptionContext
java.lang.Object
com.google.common.eventbus.SubscriberExceptionContext
Context for an exception thrown by a subscriber.
- Since:
- 16.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubscriberExceptionContext
(EventBus eventBus, Object event, Object subscriber, Method subscriberMethod) -
Method Summary
-
Field Details
-
eventBus
-
event
-
subscriber
-
subscriberMethod
-
-
Constructor Details
-
SubscriberExceptionContext
SubscriberExceptionContext(EventBus eventBus, Object event, Object subscriber, Method subscriberMethod) - Parameters:
eventBus
- TheEventBus
that handled the event and the subscriber. Useful for broadcasting a new event based on the error.event
- The event object that caused the subscriber to throw.subscriber
- The source subscriber context.subscriberMethod
- the subscribed method.
-
-
Method Details
-
getEventBus
- Returns:
- The
EventBus
that handled the event and the subscriber. Useful for broadcasting a new event based on the error.
-
getEvent
- Returns:
- The event object that caused the subscriber to throw.
-
getSubscriber
- Returns:
- The object context that the subscriber was called on.
-
getSubscriberMethod
- Returns:
- The subscribed method that threw the exception.
-