@Test(timeout = 60000) public void testOnConnectionCloseFailed() throws Exception { final Throwable expected = new NullPointerException("Deliberate"); rule.publisher.onConnectionCloseFailed(1, TimeUnit.MILLISECONDS, expected); rule.listener.assertMethodsCalled(Event.CloseFailed); assertThat("Listener not called with duration.", rule.listener.getDuration(), is(1L)); assertThat("Listener not called with time unit.", rule.listener.getTimeUnit(), is(TimeUnit.MILLISECONDS)); assertThat("Listener not called with error.", rule.listener.getRecievedError(), is(expected)); }
@Override public void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(closeFailedAction, duration, timeUnit, throwable); }
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { @Override public void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(closeFailedAction, duration, timeUnit, throwable); } }
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { @Override public void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(closeFailedAction, duration, timeUnit, throwable); } ConnectionEventPublisher();  ConnectionEventPublisher(ConnectionEventPublisher<T> toCopy); }
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { @Override public void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(closeFailedAction, duration, timeUnit, throwable); } ConnectionEventPublisher();  ConnectionEventPublisher(ConnectionEventPublisher<T> toCopy); @Override void onByteRead(final long bytesRead); @Override void onByteWritten(long bytesWritten); @Override void onFlushStart(); @Override void onFlushComplete(final long duration, final TimeUnit timeUnit); @Override void onWriteStart(); @Override void onWriteSuccess(final long duration, final TimeUnit timeUnit); @Override void onWriteFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @Override void onConnectionCloseStart(); @Override void onConnectionCloseSuccess(final long duration, final TimeUnit timeUnit); @Override void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final 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 Subscription subscribe(T listener); @Override boolean publishingEnabled(); ConnectionEventPublisher<T> copy(); }
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { @Override public void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable) { listeners.invokeListeners(closeFailedAction, duration, timeUnit, throwable); } ConnectionEventPublisher();  ConnectionEventPublisher(ConnectionEventPublisher<T> toCopy); @Override void onByteRead(final long bytesRead); @Override void onByteWritten(long bytesWritten); @Override void onFlushStart(); @Override void onFlushComplete(final long duration, final TimeUnit timeUnit); @Override void onWriteStart(); @Override void onWriteSuccess(final long duration, final TimeUnit timeUnit); @Override void onWriteFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @Override void onConnectionCloseStart(); @Override void onConnectionCloseSuccess(final long duration, final TimeUnit timeUnit); @Override void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final 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 Subscription subscribe(T listener); @Override boolean publishingEnabled(); ConnectionEventPublisher<T> copy();  }