1 package org.simantics.databoard.channel;
\r
3 import java.util.Collection;
\r
5 import org.simantics.databoard.binding.mutable.Variant;
\r
8 * Command channel is a request-response channel. All operations are asynchronous.
\r
9 * This interface is intended to be used by channel clients.
\r
10 * For each callable command there is a commandId and specified datatype for request and error.
\r
12 * @author Toni Kalajainen <toni.kalajainen@iki.fi>
\r
14 public interface CommandChannel {
\r
17 * Invoke a service request. A asynchronous result object is returned
\r
20 * @param commandId command identifier
\r
21 * @param request the request object
\r
22 * @return asynchrouns result object
\r
24 AsyncRequest invoke( Variant commandId, Variant request );
\r
27 * Get all callable commands of the channel.
\r
28 * This result is list of command specifications. For each command there is
\r
29 * unique identification, result type and error type.
\r
33 Collection<CommandSpec> getCommands();
\r