Class ActionRouter
-
- All Implemented Interfaces:
-
java.awt.event.ActionListener
,java.util.EventListener
public final class ActionRouter implements ActionListener
-
-
Method Summary
Modifier and Type Method Description void
actionPerformed(ActionEvent e)
void
doActionNow(ActionEvent e)
To execute an action immediately in the current thread. Set<Command>
getAction(String actionName)
Get the set of Commands registered under the name actionName
Command
getAction(String actionName, Class<out Object> actionClass)
Get the Command registered under the name actionName
, that is of ClassactionClass
Command
getAction(String actionName, String className)
Get the Command registered under the name actionName
, which class names are equal toclassName
void
addPreActionListener(Class<out Object> action, ActionListener listener)
Allows an ActionListener to receive notification of a command being executed prior to the actual execution of the command. void
removePreActionListener(Class<out Object> 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. void
addPostActionListener(Class<out Object> action, ActionListener listener)
Allows an ActionListener to receive notification of a command being executed after the command has executed. void
removePostActionListener(Class<out Object> action, ActionListener listener)
Allows an ActionListener to be removed from receiving notifications of a command being executed after the command has executed. void
populateCommandMap()
Only for use by the JMeter.startGui. static ActionRouter
getInstance()
Gets the Instance attribute of the ActionRouter class -
-
Method Detail
-
actionPerformed
void actionPerformed(ActionEvent e)
-
doActionNow
void doActionNow(ActionEvent e)
To execute an action immediately in the current thread.
- Parameters:
e
- the action to execute
-
getAction
Set<Command> getAction(String actionName)
Get the set of Commands registered under the name
actionName
-
getAction
Command getAction(String actionName, String className)
Get the Command registered under the name
actionName
, which class names are equal toclassName
-
addPreActionListener
void addPreActionListener(Class<out Object> 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.listener
- the ActionListener to receive the notifications
-
removePreActionListener
void removePreActionListener(Class<out Object> 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.listener
- the ActionListener to receive the notifications
-
addPostActionListener
void addPostActionListener(Class<out Object> 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.listener
- The ActionListener to be registered
-
removePostActionListener
void removePostActionListener(Class<out Object> 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.listener
- The ActionListener that should be deregistered
-
populateCommandMap
void populateCommandMap()
Only for use by the JMeter.startGui. This method must not be called by getInstance() as was done previously. See Bug 58790
-
getInstance
static ActionRouter getInstance()
Gets the Instance attribute of the ActionRouter class
- Returns:
The Instance value
-
-
-
-