Two subscribers are equivalent when they refer to the same method on the same object (not class). This property is used to ensure that no subscriber method is registered more than once.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Subscriber.
Subscriber that synchronizes invocations of a method to ensure that only one thread may enter the method at a time. |
| Modifier and Type | Field and Description |
|---|---|
| private EventBus | bus
The event bus this subscriber belongs to. |
| private final Executor | executor
Executor to use for dispatching events to this subscriber. |
| private final Method | method
Subscriber method. |
| pack-priv final Object | target
The object with the subscriber method. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private SubscriberExceptionContext | |
| pack-priv static Subscriber | |
| pack-priv final void | |
| public final boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public final int | |
| pack-priv void | |
| private static boolean | isDeclaredThreadSafe(Method method)
Checks whether |
| bus | back to summary |
|---|---|
| private EventBus bus The event bus this subscriber belongs to. | |
| executor | back to summary |
|---|---|
| private final Executor executor Executor to use for dispatching events to this subscriber. | |
| method | back to summary |
|---|---|
| private final Method method Subscriber method. | |
| target | back to summary |
|---|---|
| pack-priv final Object target The object with the subscriber method. | |
| Subscriber | back to summary |
|---|---|
| private Subscriber(EventBus bus, Object target, Method method) | |
| context | back to summary |
|---|---|
| private SubscriberExceptionContext context(Object event) Gets the context for the given event. | |
| create | back to summary |
|---|---|
| pack-priv static Subscriber create(EventBus bus, Object listener, Method method) Creates a | |
| dispatchEvent | back to summary |
|---|---|
| pack-priv final void dispatchEvent(Object event) Dispatches | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| invokeSubscriberMethod | back to summary |
|---|---|
| pack-priv void invokeSubscriberMethod(Object event) throws InvocationTargetException Invokes the subscriber method. This method can be overridden to make the invocation synchronized.
| |
| isDeclaredThreadSafe | back to summary |
|---|---|
| private static boolean isDeclaredThreadSafe(Method method) Checks whether | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | invokeSubscriberMethod(Object event)
Overrides com. |
| SynchronizedSubscriber | back to summary |
|---|---|
| private SynchronizedSubscriber(EventBus bus, Object target, Method method) | |
| invokeSubscriberMethod | back to summary |
|---|---|
| pack-priv void invokeSubscriberMethod(Object event) throws InvocationTargetException Overrides com. Doc from com. Invokes the subscriber method. This method can be overridden to make the invocation synchronized.
| |