MCPcopy Index your code
hub / github.com/OpenTSDB/async / Callback

Interface Callback

src/Callback.java:39–60  ·  view source on GitHub ↗

A simple 1-argument callback interface. Callbacks are typically created as anonymous classes. In order to make debugging easier, it is recommended to override the Object#toString method so that it returns a string that briefly explains what the callback does. If you use {@link Deferred

Source from the content-addressed store, hash-verified

37 * @param <T> The argument type of the callback.
38 */
39public interface Callback<R, T> {
40
41 /**
42 * The callback.
43 * @param arg The argument to the callback.
44 * @return The return value of the callback.
45 * @throws Exception any exception.
46 */
47 public R call(T arg) throws Exception;
48
49 /** The identity function (returns its argument). */
50 public static final Callback<Object, Object> PASSTHROUGH =
51 new Callback<Object, Object>() {
52 public Object call(final Object arg) {
53 return arg;
54 }
55 public String toString() {
56 return "passthrough";
57 }
58 };
59
60}

Callers 2

doCallMethod · 0.65
toStringMethod · 0.65

Implementers 5

Chainsrc/Deferred.java
Signalsrc/Deferred.java
Continuesrc/Deferred.java
Notifysrc/DeferredGroup.java
NotifyOrderedsrc/DeferredGroup.java

Calls

no outgoing calls

Tested by

no test coverage detected