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()
IDebuggerCallbacks
null
if not known.getHttpExe
in interface IDebuggerCallbacks
public File getPlayerExe()
IDebuggerCallbacks
null
if not known.getPlayerExe
in interface IDebuggerCallbacks
public void recomputeExeLocations()
IDebuggerCallbacks
recomputeExeLocations
in interface IDebuggerCallbacks
public String getHttpExeName()
IDebuggerCallbacks
null
.getHttpExeName
in interface IDebuggerCallbacks
public String getPlayerExeName()
IDebuggerCallbacks
null
.getPlayerExeName
in interface IDebuggerCallbacks
protected String extractExenameFromCommandString(String cmd)
public Process launchDebugTarget(String[] cmd) throws IOException
IDebuggerCallbacks
launchDebugTarget
in interface IDebuggerCallbacks
IOException
public Process launchDebugTarget(String[] cmd, ILauncher launcher) throws IOException
IDebuggerCallbacks
ILauncher.launch(cmd)
.launchDebugTarget
in interface IDebuggerCallbacks
IOException
public void terminateDebugTarget(Process process) throws IOException
IDebuggerCallbacks
terminateDebugTarget
in interface IDebuggerCallbacks
IOException
public void terminateDebugTarget(Process process, ILauncher launcher) throws IOException
IDebuggerCallbacks
ILauncher.terminate(process)
terminateDebugTarget
in interface IDebuggerCallbacks
IOException
public String queryWindowsRegistry(String key, String value) throws IOException
IDebuggerCallbacks
queryWindowsRegistry
in interface IDebuggerCallbacks
key
- 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 IDebuggerCallbacks
IOException
public int[] getAppVersion(File application) throws IOException
getAppVersion
in interface IDebuggerCallbacks
application
- 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 IDebuggerCallbacks
Copyright © 2016 The Apache Software Foundation. All rights reserved.