@Test public void testOnComplete() throws Exception { WrappedCallback<AsyncSSLClient, echo_call> wcb = new WrappedCallback<>(callback, client, clientPool); wcb.onComplete(response); InOrder inOrder = inOrder(client, clientPool, callback); inOrder.verify(clientPool).release(client, true); inOrder.verify(callback).onComplete(response); verifyNoMoreInteractions(client, clientPool, callback); }
@Override public void onComplete(T response) { releaseClient(true); underlying.onComplete(response); }
WrappedCallback implements AsyncMethodCallback<T> { @Override public void onComplete(T response) { releaseClient(true); underlying.onComplete(response); } }
WrappedCallback implements AsyncMethodCallback<T> { @Override public void onComplete(T response) { releaseClient(true); underlying.onComplete(response); } WrappedCallback(AsyncMethodCallback<T> underlying,
                         C client,
                         ClientPool<C> clientPool); }
WrappedCallback implements AsyncMethodCallback<T> { @Override public void onComplete(T response) { releaseClient(true); underlying.onComplete(response); } WrappedCallback(AsyncMethodCallback<T> underlying,
                         C client,
                         ClientPool<C> clientPool); @Override void onComplete(T response); @Override void onError(Exception exception); }
WrappedCallback implements AsyncMethodCallback<T> { @Override public void onComplete(T response) { releaseClient(true); underlying.onComplete(response); } WrappedCallback(AsyncMethodCallback<T> underlying,
                         C client,
                         ClientPool<C> clientPool); @Override void onComplete(T response); @Override void onError(Exception exception);  }