OpenNMS API 1.2.9

## org.opennms.core.utils
Interface ExecutorStrategy

All Known Implementing Classes:
  ClassExecutor, CommandExecutor

public interface ExecutorStrategy

Author:
  David Hustace , OpenNMS Implement this interface to as a means of executing code be it a Java class or system command. This interface was created to provide a Java Notification plugin interface. The original CommandExecutor class was developed to execute system commands calling its execute method with the command name and a list of command line paramenters. Now the ClassExecutor class implements this interface and the execute method instantiates the Java class specified in the commandLine parameter to the execute method. Now, this interface is implemented by the ClassExecutor class that allows the notification process (NotificationTask) to simply call the execute method and not be concerned if the strategy (binary flag) actually executes a command or instantiates a Java class.

Method Summary
`int` `execute(java.lang.String commandLine, java.util.List arguments)` Implement this method to support execute style commands such as a system command or to instantiate a Java class.

Method Detail

### execute

    public int execute(java.lang.String commandLine,
                       java.util.List arguments)

  Implement this method to support execute style commands such as a system command or to instantiate a Java class.

  Parameters:
    `commandLine` - the command/class to execute/instantiate
    `arguments` - a list of Argument objects that need to be passed to the command line call or the class execute method
  Returns:
    int, the return code of the command/execute method

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.