The Handler

The Handler is a separate object (of class com.engineous.sdk.vars. DataHandler) that contains or points to the contents of the file parameter. Every file parameter has a handler, and you must specify the handler type when configuring the file parameter (except in a few cases, discussed below). The type of handler controls how the data are physically stored and accessed allowing different data sources to be supported by creating new DataHandler classes.

There are currently three DataHandler classes, plus one special option for Output file parameters.

  • com.engineous.plugin.DataHandlerFile

    The data are stored in a file on the system. When using distributed execution on SIMULIA Execution Engine stations in the SIMULIA Execution Engine environment, the file must be on some sort of shared file system (most likely Windows File Sharing or NFS). Isight can avoid copying the data and allow the component to reference the file directly in its original location on disk under certain circumstances. This capability can be important if the file is very large (more than 10MB). File Handlers work equally well for Input and Output file parameters. A File Handler is the usual way to deal with very large files.

  • com.engineous.plugin.DataHandlerURL

    The data are stored somewhere on the network, pointed to by a URL. URL schemes http:, https:, ftp:, and file: are supported. When the data are needed, a network connection is made to the proper server, and the data are copied into the working directory. URL Handlers are used mostly for Input file parameters. They were designed to handle files of any size, but the current implementation of the java.net.URL class limits a URL Handler to files small enough to fit into memory. It is possible under some restricted circumstances to have an Output file parameter with a URL Handler. When the component finishes executing, the data are read from the working directory and sent to the server if an ftp server or an http server will accept a PUT operation.

  • com.engineous.plugin.DataHandlerInline

    The data are stored inside the Isight model. Inline Handlers are used only for Input file parameters and only for relatively small files (under about 5 MB).

  • Isight File Manager

    Isight File Manager is not an actual handler class, but it behaves as one. You configure a File Parameter to use the Isight File Manager by setting the toOption to OUTPUT_OPTION_FILEMGR (see The Local Name and toOption). Isight File Manager is used only for Output File parameters. The data are handled entirely by Isight—you do not need to worry about where the data are stored. Isight takes care of copying the data to and from the SIMULIA Execution Engine stations during distributed execution in the SIMULIA Execution Engine environment. The contents of the file are stored with the Job Results in the SIMULIA Execution Engine database.

When a file parameter is mapped from one component to another at run time, the entire setting of the Handler is copied—the handler type and its configuration. The data are copied only for an Inline Handler—for the other handlers only the location of the data is copied. As a result, the Handler configured for an Input file parameter is not used if that parameter is mapped from another component. The behavior is the same as that for Real or String parameters—the Default Value is not used when the parameter is mapped. The Handler will be used if the component is run by itself (while testing the model), so it is usually necessary to configure the handler even for a mapped Input File Parameter.

An Output file parameter may be used when no Handler is configured. Instead, when the component finishes executing, an appropriate Handler is created and automatically configured. For the purposes of mapping File Parameters, the automatically generated Handler is copied in the same way as preconfigured handler.