public class SwingcorderMain extends Object
There are two ways this class can be used to activate the functionality:
main()method would normally be invoked. For example, if an application is normally invoked using the following command:
java -cp PointOfSale-1.1.0.jar com.acme.MyMainClass ./config-dir
To use this class to enable the functionality before running the application the following would be specified instead of the above:
java -cp PointOfSale-1.1.0.jar com.kandor.swingcorder.SwingcorderMain com.acme.MyMainClass
This works by activating the functionality and then invoking the static
main() method of the class
identified by the first argument, also passing it any additional arguments as though the command specified
that class as the application entry point instead of this one.
This is the recommended approach because it allows the code to be enabled without making any changes or additions to the source code of the application with which it is used.
activate()method defined in this class. With this approach the application for which recording and playback is to be performed must be modified to invoke this method.
|Constructor and Description|
|Modifier and Type||Method and Description|
Activates the recording functionality in the currently running Java Virtual Machine (JVM).
Deactivates the recording functionality in the currently running Java Virtual Machine (JVM).
This method activates the recording functionality, calls the static
main()method of another class and passes it the specified arguments, and then deactivates recording functionality. It's provided as an alternative to having to embed in user application code calls to activate and deactivate recording functionality. That is, instead of calling your application code code and having it activate and deactivate recording capabilities, you can simply call this method, passing it the name of the class with the static
main()method and any arguments that should be passed to that method.
public static void activate() throws Exception
main(String)method in this class.
Exception- An error occurred activating the recording functionality.
public static void deactivate() throws Exception
Exception- An error occurred deactivating the recording functionality.