Public methods are DS2
package methods that can be called by clients that are external to
SAS Micro Analytic Service, such as SAS Event Stream Processing.
When a public method
is registered with SAS Event Stream Processing as an event processor,
the method's arguments are automatically mapped to the fields
of the given source window and procedural window events. You register
the method either by calling dfESPproject::registerMethod_MAS() or
by including it in a window-map entry of an XML project definition.
Note: The method-argument-to-event-field
mappings are by name and are case sensitive.
DS2 package methods
to be used for event processing must follow all of the public method
rules described below.
Private methods and
packages are SAS Micro Analytic Service concepts, rather than DS2
features.
SAS Micro Analytic Service
can host public DS2 packages and private DS2 packages. Private DS2
packages have fewer restrictions on the DS2 features that can be used
than public packages have. Although a private DS2 package cannot be
called directly, it can be called by another DS2 package. Private
DS2 packages are useful as utility functions, as solution-specific
built-in functions, or for solution infrastructure. See your SAS
solution documentation for a description of the solution-specific
built-in functions that you can use when authoring custom DS2 modules.
A public DS2 package
can contain private methods, as long as it contains at least one public
method. Any method that does not conform to the rules for public
methods is automatically treated as private. Private methods are
allowed and do not produce errors if they contain correct DS2 syntax.
Private methods are not callable externally. Therefore, they do not
show up when querying the list of methods within a package. However,
they can be called internally by other DS2 package methods. Here are
several typical uses of private methods:
-
Small utility functions that return
a single, non-void, result.
-
Methods containing DS2 package
arguments. These are not callable externally.