Package com.dassault_systemes.vpmdesktop.vdk0interfaces.infra

   
Class ENOVCSCommandFactory

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.vpmdesktop.vdk0interfaces.infra.ENOVCSCommandFactory
Class Location

Framework : VPMDesktop

Module : VDK0Interfaces

Class Description

public class ENOVCSCommandFactory

This class handles instantiation of Client-server commands. It returns ENOVCSCommand that is used to set command parameters, invoke server and retrieve results as described in the example below. This class is subject to change in future releases. CLIENT-SERVER COMMANDS SHOULD ALWAYS BE INSTANTIATED VIA THIS FACTORY AND NEVER DIRECTLY TO MINIMIZE IMPACTS OF ENOVIA CODE CHANGES. Example : We will create a client-server command MYCUSTOCOMMAND (a late type of the server command that will be invoked by this command), set parameter into it, execute it and retrieve a result : { // create a command to access server command with late type MYCUSTOCOMMAND ENOVICSCommand serverCommand = ENOVCSCommandFactory.createCSCommand("MYCUSTOCOMMAND"); // set input parameter with name "my_input_attribute_name" to a value "my_input_attribute_value" // there are symmetrical methods on the server to retrieve these parameters serverCommand.setParameter(my_input_attribute_name, my_input_attribute_value); //Execute server implementation of the command try{ serverCommand.executeCommand(); } catch(ENOVCSCommunicationException) { //Error Handling } // Retrieve Results by name (similar to parameters, retrieve with the same name that was set on the server) String my_result = serverCommand.getStringResult(my_output_name); // check messages from the server ENOVICSMessage [] messages = serverCommand.getMessages(); }

Field Summary

Constructor Summary
ENOVCSCommandFactory()

Method Summary
ENOVICSCommand createCSCommand(String commandName)


Field Detail

Constructor Detail

ENOVCSCommandFactory

    ENOVCSCommandFactory()


Method Detail

createCSCommand

    ENOVICSCommand createCSCommand(String commandName)

This method creates a client-server command with late type passed as a commandName

Parameters:
commandName
late type of a server command to be executed by the client-server command.
Returns:
client-server command.


Copyright © 2000, Dassault Systèmes. All rights reserved