@EventListener public void handleSecond(String payload) { this.order.add("second"); } }
@EventListener @Order(-50) public void handleFirst(String payload) { this.order.add("first"); }
@EventListener @Order(50) public void handleThird(String payload) { this.order.add("third"); }
@EventListener public void handleString(GenericEventPojo<String> value) { collectEvent(value); } }
@EventListener public void generateCheckedException(GenericTestEvent<String> event) throws IOException { if ("fail".equals(event.getPayload())) { throw new IOException("Test exception"); } } }
@EventListener @Async public void handleAsync(AnotherTestEvent event) { collectEvent(event); if ("fail".equals(event.content)) { this.countDownLatch.countDown(); throw new IllegalStateException("Test exception"); } } }
@EventListener @Override public void handleIt(TestEvent event) { this.eventCollector.addEvent(this, event); }
@EventListener private void handleIt(TestEvent event) { collectEvent(event); } }
@EventListener public void handleIt(TestEvent event) { collectEvent(event); } }
@EventListener(condition = "!'SKIP'.equals(#data)") public void handleImmediately(String data) { handleEvent(EventCollector.IMMEDIATELY, data); } }
@EventListener public void handle(TestEvent event) { collectEvent(event); if ("fail".equals(event.msg)) { throw new IllegalStateException("Test exception"); } }
@EventListener public void handleIt(TestEvent event) { collectEvent(event); } }
@EventListener public void generateRuntimeException(GenericTestEvent<String> event) { if ("fail".equals(event.getPayload())) { throw new IllegalStateException("Test exception"); } }
@EventListener @Override public void handleIt(TestEvent event) { this.eventCollector.addEvent(this, event); }
@Override @EventListener(condition = "#payload.startsWith('OK')") public void handleString(String payload) { super.handleString(payload); }
@EventListener public void handleString(String content) { collectEvent(content); } }
@EventListener @Async public void handleAsync(AnotherTestEvent event) { assertTrue(!Thread.currentThread().getName().equals(event.content)); this.eventCollector.addEvent(this, event); this.countDownLatch.countDown(); } }
@EventListener @Async public void handleAsync(AnotherTestEvent event) { assertTrue(!Thread.currentThread().getName().equals(event.content)); collectEvent(event); this.countDownLatch.countDown(); } }
@EventListener @Async public void handleAsync(AnotherTestEvent event) { assertTrue(!Thread.currentThread().getName().equals(event.content)); this.eventCollector.addEvent(this, event); this.countDownLatch.countDown(); } }
@EventListener public void handleString(PayloadApplicationEvent<String> event) { collectEvent(event.getPayload()); } }