org.simantics.databoard.channel
Interface CommandChannel


public interface CommandChannel

Command channel is a request-response channel. All operations are asynchronous. This interface is intended to be used by channel clients. 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, Variant request)
          Invoke a service request.
 

Method Detail

invoke

AsyncRequest invoke(Variant commandId,
                    Variant request)
Invoke a service request. A asynchronous result object is returned at-once.

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