Guava DeadEvent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava DeadEvent class.

This code example shows how to use the following methods:getEvent
   @Resource 
   private Logger logger = Logger.NULL; 
 
   @Subscribe 
   public void handleDeadEvent(DeadEvent deadEvent) { // NO_UCD
      logger.trace("detected dead event %s", deadEvent.getEvent());
   } 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getEvent
        bus().unregister(listener);
    } 
 
    @Subscribe 
    public void deadEvent(final DeadEvent event) {
        ErlLogger.warn("no handler for " + event.getEvent().getClass().getName());
    } 
 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getEvent
	} 
 
	@Subscribe 
	public void handleDeadEvents(DeadEvent deadEvent) {
		System.out.print("Event without a subscriber: ");
		System.out.println(deadEvent.getEvent());
	} 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getEvent
    @Test
    public void testDeadEvent() { 
        eventPublisher.createNoSubscribedEvent();
        assertThat(deadEventSubscriber.deadEvents.size(), is(1));
        DeadEvent deadEvent = deadEventSubscriber.deadEvents.get(0);
        assertSame(deadEvent.getEvent().getClass(), NoSubscriberEvent.class);
    } 
 
 
    @Test
    public void testCreditCardPurchaseEventReceived() { 
        generateCreditPurchaseEvent(); 
        assertThat(cashPurchaseEventSubscriber.getHandledEvents().size(), is(0));
        assertThat(creditPurchaseEventSubscriber.getHandledEvents().size(), is(1));
        assertSame(creditPurchaseEventSubscriber.getHandledEvents().get(0).getClass(), CreditPurchaseEvent.class);
    } 
 
 
    @Test
    public void testGetAllPurchaseEvents() { 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getEvent
     * 
     * @param deadEvent dead event 
     */ 
    @Subscribe 
    public void handleDeadEvent(final DeadEvent deadEvent) {
        LOGGER.warn("Event not handled: {}", deadEvent.getEvent().toString());
    } 
 
    /** 
     * Create Holmes lock file. 
     * 
     * @throws RuntimeException if lock fails 
     */ 
    private boolean lockInstance() { 
        try { 
            if (fileLock == null) {
                // Create lock file 
                randomAccessFile = new RandomAccessFile(new File(localHolmesDataDir, LOCK_FILE_NAME), "rw");
                fileLock = randomAccessFile.getChannel().tryLock();
                if (fileLock == null) {
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Guava DeadEvent Methods: