
Classes | |
| class | Result |
| class | StreamReader |
| class | TimeoutException |
| class | TimeoutTimerTask |
Static Public Member Functions | |
| static synchronized void | addThreadInterrupt (Thread thread, String message) |
| static void | checkThreadInterrupt () |
| static synchronized String | clearThreadInterrupt (Thread thread) |
| static NSBundle | createBundleIfNeeded (String name) |
| static final Result | execute (String[] command, String[] envp, File dir, long timeout) throws IOException, TimeoutException |
| static final Result[] | executeCommandLineCommandsWithEnvVarsInWorkingDir (String[][] commands, String[] envp, File dir) throws IOException |
| static final Result | executeCommandLineCommandWithArgumentsWithEnvVarsInWorkingDir (String[] command, String[] envp, File dir) throws IOException |
| static void | freeProcessResources (Process p) |
| static NSMutableDictionary < String, Object > | informationForBundles () |
| static NSMutableDictionary < String, Object > | informationForContext (WOContext context) |
| static NSMutableDictionary < String, Object > | informationForException (Exception e) |
| static NSBundle | loadBundleIfNeeded (File bundleFile) |
| static Throwable | originalThrowable (Throwable t) |
Static Public Attributes | |
| static final Logger | log |
Static Private Attributes | |
| static NSMutableDictionary < Thread, String > | flags |
| static synchronized void addThreadInterrupt | ( | Thread | thread, | |
| String | message | |||
| ) | [static] |
Call this to get the thread in question interrupted on the next call to checkThreadInterrupt().
| thread | ||
| message |
| static void checkThreadInterrupt | ( | ) | [static] |
When you have an inner loop and you want to be able to bail out on a stop request, call this method and you will get interrupted when another thread wants you to.
| static synchronized String clearThreadInterrupt | ( | Thread | thread | ) | [static] |
Clear the interrupt flag for the thread.
| thread |
| static NSBundle createBundleIfNeeded | ( | String | name | ) | [static] |
Hack to create a bundle after the app is loaded. Useful for the insistence of EOF on JavaXXXAdaptor bundles.
| name |
| static final Result execute | ( | String[] | command, | |
| String[] | envp, | |||
| File | dir, | |||
| long | timeout | |||
| ) | throws IOException, TimeoutException [static] |
Excecutes the specified command line commands. If envp is not null the environment variables are set before executing the command. This method supports timeout's. This is quite important because its -always- possible that a UNIX or WINDOWS process does not return, even with simple shell scripts. This is due to whatever bugs and hence every invocation of Process.waitFor() should be observed and stopped if a certain amount of time is over.
| command | the commands to execute, this is an String array with two dimensions the following commands "ls -la" or "cp /tmp/file1 /tmp/file2" or "open /Applications/*.app" would be as String arrays |
new String[] { new String[] { "ls", "-la" },
new String[] { "cp", "/tmp/file1", "/tmp/file2" },
new String[] { "open", "/Applications/*.app" } }
| envp | a String array which represents the environment variables like String[] envp = new String[]{"PATH=/usr/bin:/bin", "CVS_RSH=ssh"}, can be null | |
| dir | a File object representing the working directory, can be null | |
| timeout | a long which can be either 0 indicating this method call waits until the process exits or any long number larger than 0 which means if the process does not exit after timeout milliseconds then this method throws an ERXTimeoutException |
| IOException | if something went wrong |
| static final Result [] executeCommandLineCommandsWithEnvVarsInWorkingDir | ( | String | commands[][], | |
| String[] | envp, | |||
| File | dir | |||
| ) | throws IOException [static] |
Excecutes the specified command line commands. If envp is not null the environment variables are set before executing the command.
| commands | the commands to execute, this is an String array with two dimensions the following commands "ls -la" or "cp /tmp/file1 /tmp/file2" or "open /Applications/*.app" would be as String arrays |
new String[] {
new String[] { "ls", "-la" },
new String[] { "cp", "/tmp/file1", "/tmp/file2" },
new String[] { "open", "/Applications/*.app" }
}
| envp | a String array which represents the environment variables like String[] envp = new String[]{"PATH=/usr/bin:/bin", "CVS_RSH=ssh"}, can be null | |
| dir | a File object representing the working directory, can be null |
| IOException | if something went wrong |
| static final Result executeCommandLineCommandWithArgumentsWithEnvVarsInWorkingDir | ( | String[] | command, | |
| String[] | envp, | |||
| File | dir | |||
| ) | throws IOException [static] |
Excecutes the specified command line commands. If envp is not null the environment variables are set before executing the command.
| command | the commands to execute like "ls -la" or "cp /tmp/file1 /tmp/file2" or "open /Applications/*.app" new String[]{"ls", "-la"} new String[]{"cp", "/tmp/file1", "/tmp/file2"} new String[]{"open", "/Applications/*.app"} | |
| envp | a String array which represents the environment variables like String[] envp = new String[]{"PATH=/usr/bin:/bin", "CVS_RSH=ssh"}, can be null | |
| dir | a File object representing the working directory, can be null |
| IOException | if something went wrong |
| static void freeProcessResources | ( | Process | p | ) | [static] |
Frees all of a resources associated with a given process and then destroys it.
| p | process to destroy |
| static NSMutableDictionary<String, Object> informationForBundles | ( | ) | [static] |
| static NSMutableDictionary<String, Object> informationForContext | ( | WOContext | context | ) | [static] |
| static NSMutableDictionary<String, Object> informationForException | ( | Exception | e | ) | [static] |
Returns a dictionary with useful stuff.
| e |
| static NSBundle loadBundleIfNeeded | ( | File | bundleFile | ) | [static] |
Load an application, framework or jar bundle if not already loaded.
| bundleFile | - the directory or archive (e.g., jar, war) of the bundle to load |
| NSForwardException | if bundle loading fails |
| static Throwable originalThrowable | ( | Throwable | t | ) | [static] |
Retrieves the actual cause of an error by unwrapping them as far as possible, i.e. NSForwardException.originalThrowable(), InvocationTargetException.getTargetException() or Exception.getCause() are regarded as actual causes.
NSMutableDictionary<Thread, String> flags [static, private] |
final Logger log [static] |
1.5.8