Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for bus (0.05 sec)

  1. guava/src/com/google/common/eventbus/Subscriber.java

      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;
    
      /** The object with the subscriber method. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 06 00:47:57 UTC 2021
    - 4.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/eventbus/SubscriberTest.java

        Method concat = String.class.getMethod("concat", String.class);
        new EqualsTester()
            .addEqualityGroup(
                Subscriber.create(bus, "foo", charAt), Subscriber.create(bus, "foo", charAt))
            .addEqualityGroup(Subscriber.create(bus, "bar", charAt))
            .addEqualityGroup(Subscriber.create(bus, "foo", concat))
            .testEquals();
      }
    
      private Method getTestSubscriberMethod(String name) {
        try {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/eventbus/DispatcherTest.java

              subscriber(bus, i3, "handleInteger", Integer.class));
    
      private final StringSubscriber s1 = new StringSubscriber("s1");
      private final StringSubscriber s2 = new StringSubscriber("s2");
      private final ImmutableList<Subscriber> stringSubscribers =
          ImmutableList.of(
              subscriber(bus, s1, "handleString", String.class),
              subscriber(bus, s2, "handleString", String.class));
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 27 15:41:25 UTC 2022
    - 5.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

                compEvents.add(food);
              }
            };
        bus.register(stringCatcher);
        bus.register(objCatcher);
        bus.register(compCatcher);
    
        // Two additional event types: Object and Comparable<?> (played by Integer)
        Object objEvent = new Object();
        Object compEvent = 6;
    
        bus.post(EVENT);
        bus.post(objEvent);
        bus.post(compEvent);
    
        // Check the StringCatcher...
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 15:16:45 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java

      H getSubscriber() {
        return subscriber;
      }
    
      @Override
      protected void setUp() throws Exception {
        subscriber = createSubscriber();
        EventBus bus = new EventBus();
        bus.register(subscriber);
        bus.post(EVENT);
      }
    
      @Override
      protected void tearDown() throws Exception {
        subscriber = null;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 17 15:19:38 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/eventbus/SubscriberRegistry.java

       */
      private final ConcurrentMap<Class<?>, CopyOnWriteArraySet<Subscriber>> subscribers =
          Maps.newConcurrentMap();
    
      /** The event bus this registry belongs to. */
      @Weak private final EventBus bus;
    
      SubscriberRegistry(EventBus bus) {
        this.bus = checkNotNull(bus);
      }
    
      /** Registers all subscriber methods on the given listener object. */
      void register(Object listener) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 15:16:45 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/eventbus/ReentrantEventsTest.java

    public class ReentrantEventsTest extends TestCase {
    
      static final String FIRST = "one";
      static final Double SECOND = 2.0d;
    
      final EventBus bus = new EventBus();
    
      public void testNoReentrantEvents() {
        ReentrantEventsHater hater = new ReentrantEventsHater();
        bus.register(hater);
    
        bus.post(FIRST);
    
        assertEquals(
            "ReentrantEventHater expected 2 events",
            Lists.<Object>newArrayList(FIRST, SECOND),
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/eventbus/DispatcherTest.java

              subscriber(bus, i3, "handleInteger", Integer.class));
    
      private final StringSubscriber s1 = new StringSubscriber("s1");
      private final StringSubscriber s2 = new StringSubscriber("s2");
      private final ImmutableList<Subscriber> stringSubscribers =
          ImmutableList.of(
              subscriber(bus, s1, "handleString", String.class),
              subscriber(bus, s2, "handleString", String.class));
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 27 15:41:25 UTC 2022
    - 5.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/eventbus/AsyncEventBus.java

       * identifier} as the bus's name for logging purposes.
       *
       * @param identifier short name for the bus, for logging purposes.
       * @param executor Executor to use to dispatch events. It is the caller's responsibility to shut
       *     down the executor after the last event has been posted to this event bus.
       */
      public AsyncEventBus(String identifier, Executor executor) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Apr 22 13:05:46 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java

      H getSubscriber() {
        return subscriber;
      }
    
      @Override
      protected void setUp() throws Exception {
        subscriber = createSubscriber();
        EventBus bus = new EventBus();
        bus.register(subscriber);
        bus.post(EVENT);
      }
    
      @Override
      protected void tearDown() throws Exception {
        subscriber = null;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 17 15:19:38 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top