Package org.apache.jmeter.gui.action
Class ActionRouter
- java.lang.Object
-
- org.apache.jmeter.gui.action.ActionRouter
-
- All Implemented Interfaces:
ActionListener,EventListener
public final class ActionRouter extends Object implements ActionListener
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)voidaddPostActionListener(Class<?> action, ActionListener listener)Allows an ActionListener to receive notification of a command being executed after the command has executed.voidaddPreActionListener(Class<?> action, ActionListener listener)Allows an ActionListener to receive notification of a command being executed prior to the actual execution of the command.voiddoActionNow(ActionEvent e)To execute an action immediately in the current thread.Set<Command>getAction(String actionName)Get the set ofCommands registered under the nameactionNameCommandgetAction(String actionName, Class<?> actionClass)CommandgetAction(String actionName, String className)static ActionRoutergetInstance()Gets the Instance attribute of the ActionRouter classprotected voidpostActionPerformed(Class<? extends Command> action, ActionEvent e)protected voidpreActionPerformed(Class<? extends Command> action, ActionEvent e)voidremovePostActionListener(Class<?> action, ActionListener listener)Allows an ActionListener to be removed from receiving notifications of a command being executed after the command has executed.voidremovePreActionListener(Class<?> action, ActionListener listener)Allows an ActionListener to be removed from receiving notifications of a command being executed prior to the actual execution of the command.
-
-
-
Method Detail
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformedin interfaceActionListener
-
doActionNow
public void doActionNow(ActionEvent e)
To execute an action immediately in the current thread.- Parameters:
e- the action to execute
-
getAction
public Set<Command> getAction(String actionName)
Get the set ofCommands registered under the nameactionName
-
addPreActionListener
public void addPreActionListener(Class<?> action, ActionListener listener)
Allows an ActionListener to receive notification of a command being executed prior to the actual execution of the command.- Parameters:
action- the Class of the command for which the listener will notifications for. Class must extend org.apache.jmeter.gui.action.Command.listener- the ActionListener to receive the notifications
-
removePreActionListener
public void removePreActionListener(Class<?> action, ActionListener listener)
Allows an ActionListener to be removed from receiving notifications of a command being executed prior to the actual execution of the command.- Parameters:
action- the Class of the command for which the listener will notifications for. Class must extend org.apache.jmeter.gui.action.Command.listener- the ActionListener to receive the notifications
-
addPostActionListener
public void addPostActionListener(Class<?> action, ActionListener listener)
Allows an ActionListener to receive notification of a command being executed after the command has executed.- Parameters:
action- the Class of the command for which the listener will notifications for. Class must extend org.apache.jmeter.gui.action.Command.listener- TheActionListenerto be registered
-
removePostActionListener
public void removePostActionListener(Class<?> action, ActionListener listener)
Allows an ActionListener to be removed from receiving notifications of a command being executed after the command has executed.- Parameters:
action- the Class of the command for which the listener will notifications for. Class must extend org.apache.jmeter.gui.action.Command.listener- TheActionListenerthat should be deregistered
-
preActionPerformed
protected void preActionPerformed(Class<? extends Command> action, ActionEvent e)
-
postActionPerformed
protected void postActionPerformed(Class<? extends Command> action, ActionEvent e)
-
getInstance
public static ActionRouter getInstance()
Gets the Instance attribute of the ActionRouter class- Returns:
- The Instance value
-
-