Interface RemoteAsyncResult

All Superinterfaces:
CompletionStage<Object>, Future<Object>

public interface RemoteAsyncResult extends CompletionStage<Object>, Future<Object>
The future result of invoking a RemoteMethod.

While this can technically result in an object, returning values from remote methods is highly discouraged. This has led to several issues in the past, including duplication of information (and a lot of it) over the connection. Instead, most methods should just update the trace database, and the client can retrieve the relevant information from it. One exception might be the execute method. This is typically for executing a CLI command with captured output. There is generally no place for such output to go into the trace, and the use cases for such a method to return the output are compelling. For other cases, perhaps the most you can do is return a TraceObject, so that a client can quickly associate the trace changes with the method. Otherwise, please return null/void/None for all methods.

NOTE: To avoid the mistake of blocking the Swing thread on an asynchronous result, the Future.get() methods have been overridden to check for the Swing thread. If invoked on the Swing thread with a timeout greater than 1 second, an assertion error will be thrown. Please use a non-swing thread, e.g., a task thread or script thread, to wait for results, or chain callbacks.