Package com.google.common.eventbus
Class Subscriber.SynchronizedSubscriber
- java.lang.Object
-
- com.google.common.eventbus.Subscriber
-
- com.google.common.eventbus.Subscriber.SynchronizedSubscriber
-
- Enclosing class:
- Subscriber
static final class Subscriber.SynchronizedSubscriber extends Subscriber
Subscriber that synchronizes invocations of a method to ensure that only one thread may enter the method at a time.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.eventbus.Subscriber
Subscriber.SynchronizedSubscriber
-
-
Field Summary
-
Fields inherited from class com.google.common.eventbus.Subscriber
target
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SynchronizedSubscriber(EventBus bus, java.lang.Object target, java.lang.reflect.Method method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
invokeSubscriberMethod(java.lang.Object event)
Invokes the subscriber method.-
Methods inherited from class com.google.common.eventbus.Subscriber
create, dispatchEvent, equals, hashCode
-
-
-
-
Constructor Detail
-
SynchronizedSubscriber
private SynchronizedSubscriber(EventBus bus, java.lang.Object target, java.lang.reflect.Method method)
-
-
Method Detail
-
invokeSubscriberMethod
void invokeSubscriberMethod(java.lang.Object event) throws java.lang.reflect.InvocationTargetException
Description copied from class:Subscriber
Invokes the subscriber method. This method can be overridden to make the invocation synchronized.- Overrides:
invokeSubscriberMethod
in classSubscriber
- Throws:
java.lang.reflect.InvocationTargetException
-
-