org.simantics.databoard.channel
Interface CommandChannel


public interface CommandChannel

Client interface for command channel.

Command channel is a request-response channel. All operations are asynchronous.

For each callable command there is a commandId and specified datatype for request and error.

Author:
Toni Kalajainen

Method Summary
 java.util.Collection<CommandSpec> getCommands()
          Get all callable commands of the channel.
 AsyncRequest invoke(Variant commandId, Accessor request)
          Invoke a service request.
 

Method Detail

invoke

AsyncRequest invoke(Variant commandId,
                    Accessor request)
Invoke a service request.

Note it is a good idea create accessor with Accessors.getAccessor(Binding, Object).

Parameters:
commandId - command identifier
request - the request object
Returns:
asynchrouns result object

getCommands

java.util.Collection<CommandSpec> getCommands()
Get all callable commands of the channel. This result is list of command specifications. For each command there is unique identification, result type and error type.

Returns:
commands