IAffiniumExternalCallout interface

The ExternalCallout API is contained in the interface IAffiniumExternalCallout. You must implement the IAffiniumExternalCallout interface to use the EXTERNALCALLOUT macro.

The class that implements the IAffiniumExternalCallout should have a constructor with which it can be initialized by the runtime server.

  • If there are no constructors in the class, the Java compiler creates a default constructor and this is sufficient.
  • If there are constructors with arguments, a public constructor with no argument should be provided, which will be used by the runtime server.

When developing your external callout, remember the following:

  • Each expression evaluation with an external callout creates a new instance of the class. You must manage thread safety issues for static members in the class.
  • If your external callout uses system resources, such as files or a database connection, you must manage the connections. The runtime server does not have a facility to clean up connections automatically.

You must compile your implementation against interact_externalcallout.jar located in the lib directory of your Unica Interact runtime environment installation.

IAffiniumExternalCallout enables the runtime server to request data from your Java class. The interface consists of four methods:

  • getNumberOfArguments
  • getValue
  • initialize
  • shutdown