@Test(timeout = 60000) public void testOnConnectionHandlingFailed() throws Exception { final Throwable expected = new NullPointerException(); rule.publisher.onConnectionHandlingFailed(1, MILLISECONDS, expected); rule.listener.assertMethodsCalled(ServerEvent.HandlingFailed); assertThat("Listener not called with duration.", rule.listener.getDuration(), is(1L)); assertThat("Listener not called with time unit.", rule.listener.getTimeUnit(), is(MILLISECONDS)); assertThat("Listener not called with error.", rule.listener.getRecievedError(), is(expected)); }
@Override public void onConnectionHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(HANDLE_FAILED_ACTION, duration, timeUnit, throwable); }
TcpServerEventPublisher extends TcpServerEventListener implements EventSource<TcpServerEventListener>, EventPublisher { @Override public void onConnectionHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(HANDLE_FAILED_ACTION, duration, timeUnit, throwable); } }
TcpServerEventPublisher extends TcpServerEventListener implements EventSource<TcpServerEventListener>, EventPublisher { @Override public void onConnectionHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(HANDLE_FAILED_ACTION, duration, timeUnit, throwable); } TcpServerEventPublisher(); private  TcpServerEventPublisher(TcpServerEventPublisher toCopy); }
TcpServerEventPublisher extends TcpServerEventListener implements EventSource<TcpServerEventListener>, EventPublisher { @Override public void onConnectionHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(HANDLE_FAILED_ACTION, duration, timeUnit, throwable); } TcpServerEventPublisher(); private  TcpServerEventPublisher(TcpServerEventPublisher toCopy); @Override void onNewClientConnected(); @Override void onConnectionHandlingStart(final long duration, final TimeUnit timeUnit); @Override void onConnectionHandlingSuccess(final long duration, final TimeUnit timeUnit); @Override void onConnectionHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @Override void onByteRead(long bytesRead); @Override void onByteWritten(long bytesWritten); @Override void onFlushStart(); @Override void onFlushComplete(long duration, TimeUnit timeUnit); @Override void onWriteStart(); @Override void onWriteSuccess(long duration, TimeUnit timeUnit); @Override void onWriteFailed(long duration, TimeUnit timeUnit,
                              Throwable throwable); @Override void onConnectionCloseStart(); @Override void onConnectionCloseSuccess(long duration, TimeUnit timeUnit); @Override void onConnectionCloseFailed(long duration, TimeUnit timeUnit,
                                        Throwable throwable); @Override void onCustomEvent(Object event); @Override void onCustomEvent(Object event, long duration, TimeUnit timeUnit); @Override void onCustomEvent(Object event, long duration, TimeUnit timeUnit, Throwable throwable); @Override void onCustomEvent(Object event, Throwable throwable); @Override boolean publishingEnabled(); @Override Subscription subscribe(TcpServerEventListener listener); TcpServerEventPublisher copy(); }
TcpServerEventPublisher extends TcpServerEventListener implements EventSource<TcpServerEventListener>, EventPublisher { @Override public void onConnectionHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(HANDLE_FAILED_ACTION, duration, timeUnit, throwable); } TcpServerEventPublisher(); private  TcpServerEventPublisher(TcpServerEventPublisher toCopy); @Override void onNewClientConnected(); @Override void onConnectionHandlingStart(final long duration, final TimeUnit timeUnit); @Override void onConnectionHandlingSuccess(final long duration, final TimeUnit timeUnit); @Override void onConnectionHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @Override void onByteRead(long bytesRead); @Override void onByteWritten(long bytesWritten); @Override void onFlushStart(); @Override void onFlushComplete(long duration, TimeUnit timeUnit); @Override void onWriteStart(); @Override void onWriteSuccess(long duration, TimeUnit timeUnit); @Override void onWriteFailed(long duration, TimeUnit timeUnit,
                              Throwable throwable); @Override void onConnectionCloseStart(); @Override void onConnectionCloseSuccess(long duration, TimeUnit timeUnit); @Override void onConnectionCloseFailed(long duration, TimeUnit timeUnit,
                                        Throwable throwable); @Override void onCustomEvent(Object event); @Override void onCustomEvent(Object event, long duration, TimeUnit timeUnit); @Override void onCustomEvent(Object event, long duration, TimeUnit timeUnit, Throwable throwable); @Override void onCustomEvent(Object event, Throwable throwable); @Override boolean publishingEnabled(); @Override Subscription subscribe(TcpServerEventListener listener); TcpServerEventPublisher copy();  }