|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jde.debugger.Application
Class of debuggee applications.
Inner Class Summary | |
private class |
Application.StandardErrorProcessor
Forwards the application's error output to Emacs. |
private class |
Application.StandardInputProcessor
Reads standard input from Emacs and forwards it to the application. |
private class |
Application.StandardOutputProcessor
Forwards the application's standard output to Emacs. |
private class |
Application.StandardOutputWriter
Writes a line to the socket connected to the standard I/O buffer maintained by Emacs for this application. |
Field Summary | |
(package private) java.lang.Integer |
appID
The ID that uniquely identifies this application in jdebug. |
(package private) EventHandler |
eventHandler
The EventHandler manages the events received from the
debugee vm |
(package private) EventRequestSpecList |
eventRequestSpecs
EventRequestSpecList is responsible for
keeping track of the events that the user is interested in. |
(package private) GeneralCommands |
generalCommands
|
(package private) Jdebug |
jdebug
Represents the jde. |
private long |
objIdCounter
Some classes require a unique ID with which to refer to objects they are tracking: for instance eventRequestSpecs, which need a spec ID with which to identify the specs, and identifiableSpecRequests (in ApplicationCommands) |
(package private) java.util.Collection |
pendingCommands
A collection of the commands for which the reply (result/error) has not been sent. |
private boolean |
shuttingDown
keeps track of the state of the application: exceptions/error messages will not be raised if we're shutting down. |
(package private) java.net.Socket |
sioSocket
Socket connection to do i/o |
(package private) SpecCommands |
specCommands
|
(package private) Application.StandardErrorProcessor |
standardErrorProcessor
|
(package private) Application.StandardInputProcessor |
standardInputProcessor
|
(package private) java.lang.Thread |
standardIOConnectThread
|
(package private) Application.StandardOutputProcessor |
standardOutputProcessor
|
(package private) Application.StandardOutputWriter |
standardOutputWriter
|
(package private) ObjectStore |
store
A store of all the objects jde knows about. |
(package private) ThreadCommands |
threadCommands
|
(package private) com.sun.jdi.VirtualMachine |
vm
The virtual machine that is running this application. |
Constructor Summary | |
Application(Jdebug jdebug,
java.lang.Integer appID,
com.sun.jdi.VirtualMachine vm)
Creates an instance of an application object. |
Method Summary | |
java.util.List |
findClassesMatchingPattern(java.lang.String pattern)
Return a list of ReferenceType objects for all currently loaded classes and interfaces whose name matches the given pattern. |
java.lang.Long |
generateObjectID()
|
com.sun.jdi.event.EventQueue |
getEventQueue()
|
java.lang.Integer |
getId()
|
ObjectStore |
getStore()
|
com.sun.jdi.VirtualMachine |
getVM()
METHODS * |
void |
handleCommand(java.lang.Integer cmd_id,
java.lang.String command,
java.util.List args)
Primary function called by Jdebug when a command specific to
a vm/app is received from jde. |
void |
informJDEInstallSuccessful(EventRequestSpec spec)
Inform jde on a successful spec resolution |
int |
initSIOConnect()
Launches a thread to connect the Emacs standard I/O buffer for the current process to the standard I/O of the process. |
void |
initSIOTransport()
Describe initSIOTransport method here. |
private boolean |
isShuttingDown()
|
void |
removeSpecAndInformJDE(EventRequestSpec spec,
java.lang.String problem)
Removes a Spec from the specList, and informs jde. |
void |
resolve(com.sun.jdi.ReferenceType ref)
This method is executed whenever a new reference type is prepared. |
void |
shutdown()
|
void |
signal(java.lang.String type,
java.lang.Object obj)
|
void |
signalCommandError(java.lang.Integer cmdID,
JDEException ex)
if a jde exception was caused somewhere (causing an error to be sent back for the command), we can use the string in the exception to create the error string |
void |
signalCommandError(java.lang.Integer cmdID,
java.lang.String error)
|
void |
signalCommandResult(java.lang.Integer cmd_id)
|
void |
signalCommandResult(java.lang.Integer cmdID,
java.lang.Object obj)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
final java.lang.Integer appID
final Jdebug jdebug
Jdebug
manages the jdebug link to jde.java.net.Socket sioSocket
EventHandler eventHandler
EventHandler
manages the events received from the
debugee vmcom.sun.jdi.VirtualMachine vm
EventRequestSpecList eventRequestSpecs
EventRequestSpecList
is responsible for
keeping track of the events that the user is interested in. To do
this, it maintains a list of "eventRequestSpec"s.EventRequestSpecList
,
EventRequestSpec
java.util.Collection pendingCommands
Jdebug.pendingCommands
ObjectStore store
ObjectStore
private long objIdCounter
This variable keeps a monotonically increasing count, and can be
used to generate a new id, using generateObjectID()
GeneralCommands generalCommands
SpecCommands specCommands
ThreadCommands threadCommands
private boolean shuttingDown
java.lang.Thread standardIOConnectThread
Application.StandardInputProcessor standardInputProcessor
Application.StandardOutputProcessor standardOutputProcessor
Application.StandardErrorProcessor standardErrorProcessor
Application.StandardOutputWriter standardOutputWriter
Constructor Detail |
public Application(Jdebug jdebug, java.lang.Integer appID, com.sun.jdi.VirtualMachine vm)
jdebug
- Jdebug
classappID
- Identifier used to specify this app int commands.vm
- Virtual machine in which this application is running.Method Detail |
public final com.sun.jdi.VirtualMachine getVM()
public final java.lang.Integer getId()
public final java.lang.Long generateObjectID()
public final ObjectStore getStore()
public final com.sun.jdi.event.EventQueue getEventQueue()
public final void shutdown()
public int initSIOConnect() throws JDEException
This method creates a socket for the standard I/O connection. The thread waits for Emacs to connect to the standard I/O socket.
JDEException
- if an error occurspublic void initSIOTransport()
initSIOTransport
method here.public java.util.List findClassesMatchingPattern(java.lang.String pattern) throws JDEException
public void handleCommand(java.lang.Integer cmd_id, java.lang.String command, java.util.List args)
Jdebug
when a command specific to
a vm/app is received from jde.cmd_id
- Identifies a command uniquely. See Jdebug.pendingCommands
command
- The commandargs
- And its argumentspublic void resolve(com.sun.jdi.ReferenceType ref)
EventRequestSpecList.resolve(ReferenceType)
public void informJDEInstallSuccessful(EventRequestSpec spec)
public void removeSpecAndInformJDE(EventRequestSpec spec, java.lang.String problem)
public void signal(java.lang.String type, java.lang.Object obj)
public void signalCommandResult(java.lang.Integer cmd_id)
public void signalCommandResult(java.lang.Integer cmdID, java.lang.Object obj)
public void signalCommandError(java.lang.Integer cmdID, java.lang.String error)
public void signalCommandError(java.lang.Integer cmdID, JDEException ex)
private boolean isShuttingDown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |