Contents
An interface is a defined set of input streams, output streams, and Query Tables, all based on named schemas and table schemas, that EventFlow modules can implement. StreamBase interfaces are described in StreamBase Interfaces.
To create a new, empty EventFlow interface file in an existing project:
-
Open the New StreamBase EventFlow interface wizard using one of the following methods:
-
Select
> > . -
Click the drop-down arrow next to the New toolbar button (
), and select StreamBase EventFlow™ Interface from the drop-down menu:
-
Right-click anywhere in the Project Explorer, and select
> from the context menu. -
With the cursor in any Studio view, press Ctrl+N to open the New dialog. Select StreamBase EventFlow™ Interface and click .
-
With the cursor in any Studio view, press Alt+Shift+N to open the > menu at the cursor location. Select StreamBase EventFlow™ Interface and press Enter.
-
-
In the New StreamBase EventFlow™ Interface wizard, navigate to the package name folder of the project in which you want to add the interface.
(If you fail to select an existing package name, the interface is created with the default package name. It is strongly discouraged to use the default package name.)
-
Type a name for the interface file. Studio adds the
.sbint
extension if you leave it off. -
Click
. Studio creates the new file and opens it in the Interface Editor.
To create a new interface that extends an existing StreamBase interface:
-
Follow the steps in Create a New, Empty Interface File.
-
After step 3, select the Extend existing interfaces check box and click .
-
Select the check box for the Extend existing interfaces control to take the starting point for the interface you are creating from an existing interface in the current project. Click to select from a list all the EventFlow interface files in the current project.
-
Select one or more interface files and click
. -
Click
.
You can create an interface from the currently open EventFlow module if it has the following characteristics:
-
One or more input streams whose schema is defined with a named schema.
-
One or more output streams with a declared schema.
-
One or more shared or placeholder Query Tables defined with a table schema.
If at least one of these features is not found in the current module, running the
> command results in an information dialog.![]() |
If the currently open module meets the qualifications, follow these steps to create a new interface using the current module's stream and table schema definitions:
-
Right-click the canvas background and select
> from the context menu. -
This opens the Extract interface dialog, in which the streams and Query Tables that meet the criteria above are shown. (Non-matching streams and Query Tables are omitted from the dialog.) Select the streams and Query Tables that you want to be encapsulated in the new interface.
-
Optional. Click to open a second dialog in which you can view a side-by-side comparison of the underlying XML source for the current module, before and after the refactoring.
-
Click
to create the new interface file, and to refactor the current module as an implementation of that interface. The schema definitions extracted from the module are now defined in the Definitions tab of the module.
Advanced. For advanced use cases, it is possible to create a new EventFlow interface file in the selected project in by linking to an existing file anywhere in the file system.
Note
Do not use this linked file mechanism if your only goal is to share an EventFlow interface between projects. Studio provides a much simpler way to share and reuse interfaces, as described in Project References and Importing Resources from One Module to Another. It is always better to import an external file into Studio than to link to an external file.
This feature establishes a true link, not a copy, of the specified file. When you link to a file that is outside the Studio workspace, any edits to the file in Studio affect the external file. Similarly, if you edit the original file outside of Studio, you are also editing the linked copy in the Studio workspace, possibly rendering the interface invalid.
For the rare, advanced cases where it is appropriate to create a EventFlow Interface by linking to an existing file, proceed as follows:
-
Follow the steps in Create a New, Empty Interface File.
-
Before you click
, click . This opens a new line in the dialog. -
Select the Link to file in the file system check box, and use the button to navigate to the existing interface file of interest.
Click
to insert path variables in the path to the linked file to avoid hard-coding an absolute path name. The path variables feature is provided by Eclipse, and is not part of StreamBase Studio. For guidance, see the Help topic Path Variables in the Eclipse Workbench User Guide. -
Click
.
Caution
In very advanced cases, it is possible to use both the Extend existing interfaces and Link to file options at the same time. In this case, the linked-to Interface file must have already been implemented using the same Interface you select in the Choose Interfaces dialog. On creation of such a linked file, Studio typechecking reports any failures to conform to the selected Interfaces.