Creating a Class that Extends AbstractActionHandlerContext
Procedure
-
Create a class that extends
AbstractActionHandlerContext as shown in the following code snippet:
class MyActionHandlerContextImpl extends AbstractActionHandlerContext { //override init, stop, getAction here. //Action returned by getAction is as shown in Step 3. It should extend AbstractActionImpl and provide the performAction method }
-
Override the
init()
method. The
init() method is called by the Service Performance Manager engine on startup. Perform one-time initialization such as resource allocations, and so on here.
void init(java.util.Properties configuration)
-
Override the
getAction() method. This method returns an object of type Action. The Action object that is returned must implement
AbstractActionImpl.
Action getAction(Rule rule, ActionDef actionDef)
For more information about the API, refer to the TIBCO Service Performance Manager Java API reference pages.
- Override the stop() method. The stop() method is called by the engine during the shutdown process. Perform resource deallocation here.
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.