@Test public void testPublishEventByNoSubscriber() { for (int i = 0; i < 3; i++) { Assert.assertFalse(NotifyCenter.publishEvent(new TestEvent7())); } }
public static boolean publishEvent(final Event event) { try { return publishEvent(event.getClass(), event); } catch (Throwable ex) { LOGGER.error("There was an exception to the message publishing : {}", ex); return false; } }
NotifyCenter { public static boolean publishEvent(final Event event) { try { return publishEvent(event.getClass(), event); } catch (Throwable ex) { LOGGER.error("There was an exception to the message publishing : {}", ex); return false; } } }
NotifyCenter { public static boolean publishEvent(final Event event) { try { return publishEvent(event.getClass(), event); } catch (Throwable ex) { LOGGER.error("There was an exception to the message publishing : {}", ex); return false; } }  }
NotifyCenter { public static boolean publishEvent(final Event event) { try { return publishEvent(event.getClass(), event); } catch (Throwable ex) { LOGGER.error("There was an exception to the message publishing : {}", ex); return false; } }  @JustForTest static Map<String, EventPublisher> getPublisherMap(); @JustForTest static EventPublisher getPublisher(Class<? extends Event> topic); @JustForTest static EventPublisher getSharePublisher(); static void shutdown(); static void registerSubscriber(final Subscriber consumer); static void deregisterSubscriber(final Subscriber consumer); static boolean publishEvent(final Event event); static EventPublisher registerToSharePublisher(final Class<? extends SlowEvent> eventType); static EventPublisher registerToPublisher(final Class<? extends Event> eventType, final int queueMaxSize); static void deregisterPublisher(final Class<? extends Event> eventType); }
NotifyCenter { public static boolean publishEvent(final Event event) { try { return publishEvent(event.getClass(), event); } catch (Throwable ex) { LOGGER.error("There was an exception to the message publishing : {}", ex); return false; } }  @JustForTest static Map<String, EventPublisher> getPublisherMap(); @JustForTest static EventPublisher getPublisher(Class<? extends Event> topic); @JustForTest static EventPublisher getSharePublisher(); static void shutdown(); static void registerSubscriber(final Subscriber consumer); static void deregisterSubscriber(final Subscriber consumer); static boolean publishEvent(final Event event); static EventPublisher registerToSharePublisher(final Class<? extends SlowEvent> eventType); static EventPublisher registerToPublisher(final Class<? extends Event> eventType, final int queueMaxSize); static void deregisterPublisher(final Class<? extends Event> eventType); static int ringBufferSize; static int shareBufferSize; }