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