Java Code Examples for com.alibaba.dubbo.remoting.exchange.ResponseCallback#done()
The following examples show how to use
com.alibaba.dubbo.remoting.exchange.ResponseCallback#done() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TracingResponseCallbackTest.java From brave with Apache License 2.0 | 6 votes |
@Test public void done_should_have_span_in_scope() { ResponseCallback delegate = new ResponseCallback() { @Override public void done(Object response) { assertThat(currentTraceContext.get()).isSameAs(invocationContext); } @Override public void caught(Throwable exception) { throw new AssertionError(); } }; ResponseCallback callback = TracingResponseCallback.create(delegate, finishSpan, currentTraceContext, invocationContext); Object result = new Object(); callback.done(result); verify(finishSpan).accept(result, null); }
Example 2
Source File: TracingResponseCallbackTest.java From brave with Apache License 2.0 | 5 votes |
@Test public void done_should_finish_span() { ResponseCallback callback = TracingResponseCallback.create(null, finishSpan, currentTraceContext, invocationContext); callback.done(null); verify(finishSpan).accept(null, null); }
Example 3
Source File: TracingResponseCallbackTest.java From brave with Apache License 2.0 | 5 votes |
@Test public void done_should_forward_then_finish_span() { ResponseCallback delegate = mock(ResponseCallback.class); ResponseCallback callback = TracingResponseCallback.create(delegate, finishSpan, currentTraceContext, invocationContext); Object result = new Object(); callback.done(result); verify(delegate).done(result); verify(finishSpan).accept(result, null); }
Example 4
Source File: SimpleFuture.java From dubbo-2.6.5 with Apache License 2.0 | 4 votes |
@Override public void setCallback(ResponseCallback callback) { callback.done(value); }
Example 5
Source File: SimpleFuture.java From dubbox with Apache License 2.0 | 4 votes |
public void setCallback(ResponseCallback callback) { callback.done(value); }
Example 6
Source File: SimpleFuture.java From dubbox-hystrix with Apache License 2.0 | 4 votes |
public void setCallback(ResponseCallback callback) { callback.done(value); }
Example 7
Source File: SimpleFuture.java From dubbo3 with Apache License 2.0 | 4 votes |
public void setCallback(ResponseCallback callback) { callback.done(value); }
Example 8
Source File: SimpleFuture.java From dubbox with Apache License 2.0 | 4 votes |
public void setCallback(ResponseCallback callback) { callback.done(value); }
Example 9
Source File: SimpleFuture.java From dubbox with Apache License 2.0 | 4 votes |
public void setCallback(ResponseCallback callback) { callback.done(value); }