| com.sun.jdi.request.EventRequestManager |
Manages the creation and deletion of EventRequests. A single
implementor of this interface exists in a particuar VM and
is accessed through eventRequestManager()
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Return an unmodifiable list of the enabled and disabled access
watchpoint requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled breakpoint requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled class prepare requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled class unload requests.
| |||||||||||
Creates a new disabled watchpoint which watches accesses to the
specified field.
| |||||||||||
Creates a new disabled
BreakpointRequest. | |||||||||||
Creates a new disabled
ClassPrepareRequest. | |||||||||||
Creates a new disabled
ClassUnloadRequest. | |||||||||||
Creates a new disabled
ExceptionRequest. | |||||||||||
Creates a new disabled
MethodEntryRequest. | |||||||||||
Creates a new disabled
MethodExitRequest. | |||||||||||
Creates a new disabled watchpoint which watches accesses to the
specified field.
| |||||||||||
Creates a new disabled
MonitorContendedEnterRequest. | |||||||||||
Creates a new disabled
MonitorContendedEnteredRequest. | |||||||||||
Creates a new disabled
MonitorWaitRequest. | |||||||||||
Creates a new disabled
MonitorWaitedRequest. | |||||||||||
Creates a new disabled
StepRequest. | |||||||||||
Creates a new disabled
ThreadDeathRequest. | |||||||||||
Creates a new disabled
ThreadStartRequest. | |||||||||||
Creates a new disabled
VMDeathRequest. | |||||||||||
Remove all breakpoints managed by this EventRequestManager.
| |||||||||||
Removes an eventRequest.
| |||||||||||
Removes a list of
EventRequests. | |||||||||||
Return an unmodifiable list of the enabled and disabled exception requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled method entry requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled method exit requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled modification
watchpoint requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled monitor contended enter requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled monitor contended entered requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled monitor wait requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled monitor waited requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled step requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled thread death requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled thread start requests.
| |||||||||||
Return an unmodifiable list of the enabled and disabled VM death requests.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.sun.jdi.Mirror
| |||||||||||
Return an unmodifiable list of the enabled and disabled access watchpoint requests. This list is a live view of these requests and thus changes as requests are added and deleted.
AccessWatchpointRequest objects.
Return an unmodifiable list of the enabled and disabled breakpoint requests. This list is a live view of these requests and thus changes as requests are added and deleted.
BreakpointRequest objects.
Return an unmodifiable list of the enabled and disabled class prepare requests. This list is a live view of these requests and thus changes as requests are added and deleted.
ClassPrepareRequest objects.
Return an unmodifiable list of the enabled and disabled class unload requests. This list is a live view of these requests and thus changes as requests are added and deleted.
ClassUnloadRequest objects.
Creates a new disabled watchpoint which watches accesses to the
specified field. The new
watchpoint is added to the list managed by this
EventRequestManager. Multiple watchpoints on the
same field are permitted.
Use enable() to
activate this event request.
Not all target virtual machines support this operation.
Use canWatchFieldAccess()
to determine if the operation is supported.
| field | the field to watch |
|---|
| UnsupportedOperationException | if the target virtual machine does not support this operation. |
|---|
Creates a new disabled BreakpointRequest.
The given Location must have a valid
(that is, non-negative) code index. The new
breakpoint is added to the list managed by this
EventRequestManager. Multiple breakpoints at the
same location are permitted. Use enable() to
activate this event request.
| location | the location of the new breakpoint. |
|---|
BreakpointRequest| NativeMethodException | if location is within a native method. |
|---|
Creates a new disabled ClassPrepareRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
ClassPrepareRequest
Creates a new disabled ClassUnloadRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
ClassUnloadRequest
Creates a new disabled ExceptionRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
A specific exception type and its subclasses can be selected
for exception events. Caught exceptions, uncaught exceptions,
or both can be selected. Note, however, that
at the time an exception is thrown, it is not always
possible to determine whether it is truly caught. See
catchLocation() for
details.
| refType | If non-null, specifies that exceptions which are instances of refType will be reported. Note: this will include instances of sub-types. If null, all instances will be reported |
|---|---|
| notifyCaught | If true, caught exceptions will be reported. |
| notifyUncaught | If true, uncaught exceptions will be reported. |
ExceptionRequest
Creates a new disabled MethodEntryRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
MethodEntryRequest
Creates a new disabled MethodExitRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
MethodExitRequest
Creates a new disabled watchpoint which watches accesses to the
specified field. The new
watchpoint is added to the list managed by this
EventRequestManager. Multiple watchpoints on the
same field are permitted.
Use enable() to
activate this event request.
Not all target virtual machines support this operation.
Use canWatchFieldModification()
to determine if the operation is supported.
| field | the field to watch |
|---|
| UnsupportedOperationException | if the target virtual machine does not support this operation. |
|---|
Creates a new disabled MonitorContendedEnterRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
Not all target virtual machines support this operation.
Use canRequestMonitorEvents()
to determine if the operation is supported.
MonitorContendedEnterRequest| UnsupportedOperationException | if the target VM does not support this operation. |
|---|
Creates a new disabled MonitorContendedEnteredRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
Not all target virtual machines support this operation.
Use canRequestMonitorEvents()
to determine if the operation is supported.
MonitorContendedEnteredRequest| UnsupportedOperationException | if the target VM does not support this operation. |
|---|
Creates a new disabled MonitorWaitRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
Not all target virtual machines support this operation.
Use canRequestMonitorEvents()
to determine if the operation is supported.
MonitorWaitRequest| UnsupportedOperationException | if the target VM does not support this operation. |
|---|
Creates a new disabled MonitorWaitedRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
Not all target virtual machines support this operation.
Use canRequestMonitorEvents()
to determine if the operation is supported.
MonitorWaitedRequest| UnsupportedOperationException | if the target VM does not support this operation. |
|---|
Creates a new disabled StepRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
The returned request will control stepping only in the specified
thread; all other threads will be unaffected.
A sizevalue of STEP_MIN will generate a
step event each time the code index changes. It represents the
smallest step size available and often maps to the instruction
level.
A size value of STEP_LINE will generate a
step event each time the source line changes unless line number information is not available,
in which case a STEP_MIN will be done instead. For example, no line number information is
available during the execution of a method that has been rendered obsolete by
by a redefineClasses(Map extends ReferenceType, byte[]>) operation.
A depth value of STEP_INTO will generate
step events in any called methods. A depth value
of STEP_OVER restricts step events to the current frame
or caller frames. A depth value of STEP_OUT
restricts step events to caller frames only. All depth
restrictions are relative to the call stack immediately before the
step takes place.
Only one pending step request is allowed per thread.
Note that a typical debugger will want to cancel stepping
after the first step is detected. Thus a next line method
would do the following:
EventRequestManager mgr = myVM.
eventRequestManager();
StepRequest request = mgr.createStepRequest(myThread,
StepRequest.STEP_LINE,
StepRequest.STEP_OVER);
request.addCountFilter(1); // next step only
request.enable();
myVM.resume();
| thread | the thread in which to step |
|---|---|
| size | the step size |
| depth | the step depth |
StepRequest| DuplicateRequestException | if there is already a pending step request for the specified thread. |
|---|---|
| IllegalArgumentException | if the size or depth arguments contain illegal values. |
Creates a new disabled ThreadDeathRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
ThreadDeathRequest
Creates a new disabled ThreadStartRequest.
The new event request is added to the list managed by this
EventRequestManager. Use enable() to
activate this event request.
ThreadStartRequest
Creates a new disabled VMDeathRequest.
The new request is added to the list managed by this
EventRequestManager.
Use enable() to
activate this event request.
This request (if enabled) will cause a
VMDeathEvent
to be sent on termination of the target VM.
A VMDeathRequest with a suspend policy of
SUSPEND_ALL
can be used to assure processing of incoming
SUSPEND_NONE or
SUSPEND_EVENT_THREAD
events before VM death. If all event processing is being
done in the same thread as event sets are being read,
enabling the request is all that is needed since the VM
will be suspended until the EventSet
containing the VMDeathEvent
is resumed.
Not all target virtual machines support this operation.
Use canRequestVMDeathEvent()
to determine if the operation is supported.
| UnsupportedOperationException | if the target VM does not support this operation. |
|---|
Remove all breakpoints managed by this EventRequestManager.
Removes an eventRequest. The eventRequest is disabled and
the removed from the requests managed by this
EventRequestManager. Once the eventRequest is deleted, no
operations (for example, setEnabled(boolean))
are permitted - attempts to do so will generally cause an
InvalidRequestStateException.
No other eventRequests are effected.
Because this method changes the underlying lists of event requests, attempting to directly delete from a list returned by a request accessor (e.g. below):
Iterator iter = requestManager.stepRequests().iterator();
while (iter.hasNext()) {
requestManager.deleteEventRequest(iter.next());
}
may cause a ConcurrentModificationException.
Instead use
deleteEventRequests(List)
or copy the list before iterating.| eventRequest | the eventRequest to remove |
|---|
Removes a list of EventRequests.
| eventRequests | the list of eventRequests to remove |
|---|
Return an unmodifiable list of the enabled and disabled exception requests. This list is a live view of these requests and thus changes as requests are added and deleted.
ExceptionRequest objects.
Return an unmodifiable list of the enabled and disabled method entry requests. This list is a live view of these requests and thus changes as requests are added and deleted.
MethodEntryRequest objects.
Return an unmodifiable list of the enabled and disabled method exit requests. This list is a live view of these requests and thus changes as requests are added and deleted.
MethodExitRequest objects.
Return an unmodifiable list of the enabled and disabled modification watchpoint requests. This list is a live view of these requests and thus changes as requests are added and deleted.
ModificationWatchpointRequest objects.
Return an unmodifiable list of the enabled and disabled monitor contended enter requests. This list is a live view of these requests and thus changes as requests are added and deleted.
MonitorContendedEnterRequest objects.Return an unmodifiable list of the enabled and disabled monitor contended entered requests. This list is a live view of these requests and thus changes as requests are added and deleted.
MonitorContendedEnteredRequest objects.Return an unmodifiable list of the enabled and disabled monitor wait requests. This list is a live view of these requests and thus changes as requests are added and deleted.
MonitorWaitRequest objects.Return an unmodifiable list of the enabled and disabled monitor waited requests. This list is a live view of these requests and thus changes as requests are added and deleted.
MonitorWaitedRequest objects.Return an unmodifiable list of the enabled and disabled step requests. This list is a live view of these requests and thus changes as requests are added and deleted.
StepRequest objects.
Return an unmodifiable list of the enabled and disabled thread death requests. This list is a live view of these requests and thus changes as requests are added and deleted.
ThreadDeathRequest objects.
Return an unmodifiable list of the enabled and disabled thread start requests. This list is a live view of these requests and thus changes as requests are added and deleted.
ThreadStartRequest objects.
Return an unmodifiable list of the enabled and disabled VM death requests. This list is a live view of these requests and thus changes as requests are added and deleted. Note: the unsolicited VMDeathEvent does not have a corresponding request.
VMDeathRequest objects.