public class DefaultDebuggerCallbacks extends Object implements IDebuggerCallbacks
| Constructor and Description |
|---|
DefaultDebuggerCallbacks() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
extractExenameFromCommandString(String cmd)
Given a command string of the form
"path_to_exe" args
or
path_to_exe args
return the path_to_exe.
|
int[] |
getAppVersion(File application)
Default implementation does not know how to get the version
of an application.
|
String[] |
getBrowserParameters(String uri)
Default application does not have any extra arguments for the
browser.
|
File |
getHttpExe()
Returns the executable of the browser to launch for http: URLs, or
null if not known. |
String |
getHttpExeName()
Returns a name such as "firefox" or "Web browser", the name of the
browser, useful for error messages.
|
File |
getPlayerExe()
Returns the executable for the standalone Flash player, or
null
if not known. |
String |
getPlayerExeName()
Returns a name such as "SAFlashPlayer.exe" or "gflashplayer" or "Flash
player", the name of the standalone player, useful for error messages.
|
Process |
launchDebugTarget(String[] cmd)
Launches a debug target.
|
Process |
launchDebugTarget(String[] cmd,
ILauncher launcher)
Launches a debug target using the launcher instance
ILauncher.launch(cmd). |
String |
queryWindowsRegistry(String key,
String value)
Query the Windows registry.
|
String |
queryWindowsRegistry(String key,
String value,
int registryBitMode)
This implementation of queryWindowsRegistry() does not make any native
calls.
|
void |
recomputeExeLocations()
Tells the debugger to recompute the values which will be returned by
getHttpExe() and getPlayerExe().
|
void |
terminateDebugTarget(Process process)
Terminates a debug target process.
|
void |
terminateDebugTarget(Process process,
ILauncher launcher)
Terminates a debug target process by invoking
ILauncher.terminate(process) |
public File getHttpExe()
IDebuggerCallbacksnull if not known.getHttpExe in interface IDebuggerCallbackspublic File getPlayerExe()
IDebuggerCallbacksnull
if not known.getPlayerExe in interface IDebuggerCallbackspublic void recomputeExeLocations()
IDebuggerCallbacksrecomputeExeLocations in interface IDebuggerCallbackspublic String getHttpExeName()
IDebuggerCallbacksnull.getHttpExeName in interface IDebuggerCallbackspublic String getPlayerExeName()
IDebuggerCallbacksnull.getPlayerExeName in interface IDebuggerCallbacksprotected String extractExenameFromCommandString(String cmd)
public Process launchDebugTarget(String[] cmd) throws IOException
IDebuggerCallbackslaunchDebugTarget in interface IDebuggerCallbacksIOExceptionpublic Process launchDebugTarget(String[] cmd, ILauncher launcher) throws IOException
IDebuggerCallbacksILauncher.launch(cmd).launchDebugTarget in interface IDebuggerCallbacksIOExceptionpublic void terminateDebugTarget(Process process) throws IOException
IDebuggerCallbacksterminateDebugTarget in interface IDebuggerCallbacksIOExceptionpublic void terminateDebugTarget(Process process, ILauncher launcher) throws IOException
IDebuggerCallbacksILauncher.terminate(process)terminateDebugTarget in interface IDebuggerCallbacksIOExceptionpublic String queryWindowsRegistry(String key, String value) throws IOException
IDebuggerCallbacksqueryWindowsRegistry in interface IDebuggerCallbackskey - The registry key, in a format suitable for the REG.EXE
program. You must use full key names such as
HKEY_LOCAL_MACHINE rather the shorter abbreviations such as
HKLM.value - The value within that key, or null for the unnamed ("empty")
valueIOException - indicates the registry query failed -- warning, this can
really happen! Some implementations of this function don't
work on Windows 2000. So, this function should not be counted
on too heavily -- you should have a backup plan.public String queryWindowsRegistry(String key, String value, int registryBitMode) throws IOException
queryWindowsRegistry in interface IDebuggerCallbacksIOExceptionpublic int[] getAppVersion(File application) throws IOException
getAppVersion in interface IDebuggerCallbacksapplication - the application whose version number is desired. On Windows,
this will typically be a path to a .exe file. On Mac, it may
point to a .app directory such as "/Applications/Safari.app",
or it may point to the underlying binary, such as
"/Applications/Safari.app/Contents/MacOS/Safari".IOException - e.g. for file not found, etc.public String[] getBrowserParameters(String uri)
getBrowserParameters in interface IDebuggerCallbacksCopyright © 2016 The Apache Software Foundation. All rights reserved.