@Test(timeout = 60000) public void testOnWriteSuccess() throws Exception { rule.publisher.onWriteSuccess(1, TimeUnit.MILLISECONDS); rule.listener.assertMethodsCalled(Event.WriteSuccess); assertThat("Listener not called with duration.", rule.listener.getDuration(), is(1L)); assertThat("Listener not called with time unit.", rule.listener.getTimeUnit(), is(TimeUnit.MILLISECONDS)); }
@Override public void onWriteSuccess(final long duration, final TimeUnit timeUnit) { listeners.invokeListeners(writeSuccessAction, duration, timeUnit); }
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { @Override public void onWriteSuccess(final long duration, final TimeUnit timeUnit) { listeners.invokeListeners(writeSuccessAction, duration, timeUnit); } }
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { @Override public void onWriteSuccess(final long duration, final TimeUnit timeUnit) { listeners.invokeListeners(writeSuccessAction, duration, timeUnit); } ConnectionEventPublisher();  ConnectionEventPublisher(ConnectionEventPublisher<T> toCopy); }
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { @Override public void onWriteSuccess(final long duration, final TimeUnit timeUnit) { listeners.invokeListeners(writeSuccessAction, duration, timeUnit); } 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 onWriteSuccess(final long duration, final TimeUnit timeUnit) { listeners.invokeListeners(writeSuccessAction, duration, timeUnit); } 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();  }