Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 90 for events (0.37 sec)

  1. android/guava/src/com/google/common/eventbus/Dispatcher.java

       * all subscribers in the order they are posted.
       *
       * <p>When all subscribers are dispatched to using a <i>direct</i> executor (which dispatches on
       * the same thread that posts the event), this yields a breadth-first dispatch order on each
       * thread. That is, all subscribers to a single event A will be called before any subscribers to
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

        // We post the event, but our Executor will not deliver it until instructed.
        bus.post(EVENT);
    
        List<String> events = catcher.getEvents();
        assertTrue("No events should be delivered synchronously.", events.isEmpty());
    
        // Now we find the task in our Executor and explicitly activate it.
        List<Runnable> tasks = executor.getTasks();
        assertEquals("One event dispatch task should be queued.", 1, tasks.size());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java

      }
    
      /**
       * Enqueues an event to be run on currently known listeners.
       *
       * <p>The {@code toString} method of the Event itself will be used to describe the event in the
       * case of an error.
       *
       * @param event the callback to execute on {@link #dispatch}
       */
      public void enqueue(Event<L> event) {
        enqueueHelper(event, event);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/eventbus/EventBusTest.java

        List<DeadEvent> events = catcher.getEvents();
        assertEquals("One dead event should be delivered.", 1, events.size());
        assertEquals("The dead event should wrap the original event.", EVENT, events.get(0).getEvent());
      }
    
      public void testDeadEventPosting() {
        GhostCatcher catcher = new GhostCatcher();
        bus.register(catcher);
    
        bus.post(new DeadEvent(this, EVENT));
    
        List<DeadEvent> events = catcher.getEvents();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

        List<DeadEvent> events = catcher.getEvents();
        assertEquals("One dead event should be delivered.", 1, events.size());
        assertEquals("The dead event should wrap the original event.", EVENT, events.get(0).getEvent());
      }
    
      public void testDeadEventPosting() {
        GhostCatcher catcher = new GhostCatcher();
        bus.register(catcher);
    
        bus.post(new DeadEvent(this, EVENT));
    
        List<DeadEvent> events = catcher.getEvents();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/eventbus/ReentrantEventsTest.java

        @Subscribe
        public void listenForStrings(String event) {
          eventsReceived.add(event);
          ready = false;
          try {
            bus.post(SECOND);
          } finally {
            ready = true;
          }
        }
    
        @Subscribe
        public void listenForDoubles(Double event) {
          assertTrue("I received an event when I wasn't ready!", ready);
          eventsReceived.add(event);
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  7. 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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:05:46 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

        // We post the event, but our Executor will not deliver it until instructed.
        bus.post(EVENT);
    
        List<String> events = catcher.getEvents();
        assertTrue("No events should be delivered synchronously.", events.isEmpty());
    
        // Now we find the task in our Executor and explicitly activate it.
        List<Runnable> tasks = executor.getTasks();
        assertEquals("One event dispatch task should be queued.", 1, tasks.size());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue May 15 20:25:06 GMT 2018
    - 2.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/eventbus/StringCatcher.java

    public class StringCatcher {
      private List<String> events = Lists.newArrayList();
    
      @Subscribe
      public void hereHaveAString(@Nullable String string) {
        events.add(string);
      }
    
      public void methodWithoutAnnotation(@Nullable String string) {
        Assert.fail("Event bus must not call methods without @Subscribe!");
      }
    
      public List<String> getEvents() {
        return events;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/eventbus/ReentrantEventsTest.java

        @Subscribe
        public void listenForStrings(String event) {
          eventsReceived.add(event);
          ready = false;
          try {
            bus.post(SECOND);
          } finally {
            ready = true;
          }
        }
    
        @Subscribe
        public void listenForDoubles(Double event) {
          assertTrue("I received an event when I wasn't ready!", ready);
          eventsReceived.add(event);
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue May 15 20:25:06 GMT 2018
    - 2.5K bytes
    - Viewed (0)
Back to top