- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 65 for subscriber (0.1 sec)
-
guava/src/com/google/common/eventbus/Subscriber.java
class Subscriber { /** Creates a {@code Subscriber} for {@code method} on {@code listener}. */ static Subscriber create(EventBus bus, Object listener, Method method) { return isDeclaredThreadSafe(method) ? new Subscriber(bus, listener, method) : new SynchronizedSubscriber(bus, listener, method); } /** The event bus this subscriber belongs to. */ @Weak private EventBus bus;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 06 00:47:57 UTC 2021 - 4.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/eventbus/EventBusTest.java
assertEquals("Event should be available.", EVENT, handler.context.getEvent()); assertEquals("Subscriber should be available.", subscriber, handler.context.getSubscriber()); assertEquals( "Method should be available.", subscriber.getClass().getMethod("throwExceptionOn", String.class), handler.context.getSubscriberMethod()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 15:16:45 UTC 2024 - 11.2K bytes - Viewed (0) -
android/guava/src/com/google/common/eventbus/SubscriberRegistry.java
for (Entry<Class<?>, Collection<Subscriber>> entry : listenerMethods.asMap().entrySet()) { Class<?> eventType = entry.getKey(); Collection<Subscriber> eventMethodsInListener = entry.getValue(); CopyOnWriteArraySet<Subscriber> eventSubscribers = subscribers.get(eventType); if (eventSubscribers == null) { CopyOnWriteArraySet<Subscriber> newSet = new CopyOnWriteArraySet<>(); eventSubscribers =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 15:16:45 UTC 2024 - 10.8K bytes - Viewed (0) -
android/guava/src/com/google/common/eventbus/Subscribe.java
* * <p>Unless also annotated with @{@link AllowConcurrentEvents}, event subscriber methods will be * invoked serially by each event bus that they are registered with. * * @author Cliff Biffle * @since 10.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @ElementTypesAreNonnullByDefault
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Apr 22 13:05:46 UTC 2021 - 1.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/eventbus/DispatcherTest.java
.containsExactly( i1, s1, s2, // Each integer subscriber immediately dispatches to 2 string subscribers. i2, s1, s2, i3, s1, s2) .inOrder(); } private static Subscriber subscriber( EventBus bus, Object target, String methodName, Class<?> eventType) { try { return Subscriber.create(bus, target, target.getClass().getMethod(methodName, eventType));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/eventbus/DispatcherTest.java
.containsExactly( i1, s1, s2, // Each integer subscriber immediately dispatches to 2 string subscribers. i2, s1, s2, i3, s1, s2) .inOrder(); } private static Subscriber subscriber( EventBus bus, Object target, String methodName, Class<?> eventType) { try { return Subscriber.create(bus, target, target.getClass().getMethod(methodName, eventType));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
internal/pubsub/pubsub.go
default: } } } } // Subscribe - Adds a subscriber to pubsub system func (ps *PubSub[T, M]) Subscribe(mask M, subCh chan T, doneCh <-chan struct{}, filter func(entry T) bool) error { totalSubs := atomic.AddInt32(&ps.numSubscribers, 1) if ps.maxSubscribers > 0 && totalSubs > ps.maxSubscribers { atomic.AddInt32(&ps.numSubscribers, -1) return fmt.Errorf("the limit of `%d` subscribers is reached", ps.maxSubscribers) } ps.Lock()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
guava/src/com/google/common/eventbus/Dispatcher.java
private final Object event; private final Subscriber subscriber; private EventWithSubscriber(Object event, Subscriber subscriber) { this.event = event; this.subscriber = subscriber; } } } /** Implementation of {@link #immediate()}. */ private static final class ImmediateDispatcher extends Dispatcher {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 7.3K bytes - Viewed (0) -
android/guava/src/com/google/common/eventbus/SubscriberExceptionContext.java
* @param subscriber The source subscriber context. * @param subscriberMethod the subscribed method. */ SubscriberExceptionContext( EventBus eventBus, Object event, Object subscriber, Method subscriberMethod) { this.eventBus = checkNotNull(eventBus); this.event = checkNotNull(event); this.subscriber = checkNotNull(subscriber);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Apr 22 13:05:46 UTC 2021 - 2.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/eventbus/SubscriberTest.java
} public void testCreate() { Subscriber s1 = Subscriber.create(bus, this, getTestSubscriberMethod("recordingMethod")); assertThat(s1).isInstanceOf(Subscriber.SynchronizedSubscriber.class); // a thread-safe method should not create a synchronized subscriber Subscriber s2 = Subscriber.create(bus, this, getTestSubscriberMethod("threadSafeMethod")); assertThat(s2).isNotInstanceOf(Subscriber.SynchronizedSubscriber.class); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 4.8K bytes - Viewed (0)