Top Description Fields Constructors Methods
com.google.common.eventbus

public Class DeadEvent

extends Object
Class Inheritance
Annotations
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkNotNull

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

Registering a DeadEvent subscriber is useful for debugging or logging, as it can detect misconfigurations in a system's event distribution.

Author
Cliff Biffle
Since
10.0

Field Summary

Modifier and TypeField and Description
private final Object
private final Object

Constructor Summary

AccessConstructor and Description
public
DeadEvent(Object
object broadcasting the DeadEvent (generally the EventBus).
source
,
Object
the event that could not be delivered.
event
)

Creates a new DeadEvent.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the 'dead' event that could not be delivered.
getEvent
()

Returns the wrapped, 'dead' event, which the system was unable to deliver to any registered subscriber.

public Object

Returns:

the source of this event.
getSource
()

Returns the object that originated this event (not the object that originated the wrapped event).

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

eventback to summary
private final Object event
sourceback to summary
private final Object source

Constructor Detail

DeadEventback to summary
public DeadEvent(Object source, Object event)

Creates a new DeadEvent.

Parameters
source:Object

object broadcasting the DeadEvent (generally the EventBus).

event:Object

the event that could not be delivered.

Method Detail

getEventback to summary
public Object getEvent()

Returns the wrapped, 'dead' event, which the system was unable to deliver to any registered subscriber.

Returns:Object

the 'dead' event that could not be delivered.

getSourceback to summary
public Object getSource()

Returns the object that originated this event (not the object that originated the wrapped event). This is generally an EventBus.

Returns:Object

the source of this event.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override