Mirrorpublic interface EventRequestManager extends Mirror
EventRequests. A single implementor of this interface exists in a particular VM and is accessed through VirtualMachine.eventRequestManager()
| Modifier and Type | Method | Description | 
|---|---|---|
| List | accessWatchpointRequests() | Return an unmodifiable list of the enabled and disabled access watchpoint requests. | 
| List | breakpointRequests() | Return an unmodifiable list of the enabled and disabled breakpoint requests. | 
| List | classPrepareRequests() | Return an unmodifiable list of the enabled and disabled class prepare requests. | 
| List | classUnloadRequests() | Return an unmodifiable list of the enabled and disabled class unload requests. | 
| AccessWatchpointRequest | createAccessWatchpointRequest | Creates a new disabled watchpoint which watches accesses to the specified field. | 
| BreakpointRequest | createBreakpointRequest | Creates a new disabled  BreakpointRequest. | 
| ClassPrepareRequest | createClassPrepareRequest() | Creates a new disabled  ClassPrepareRequest. | 
| ClassUnloadRequest | createClassUnloadRequest() | Creates a new disabled  ClassUnloadRequest. | 
| ExceptionRequest | createExceptionRequest | Creates a new disabled  ExceptionRequest. | 
| MethodEntryRequest | createMethodEntryRequest() | Creates a new disabled  MethodEntryRequest. | 
| MethodExitRequest | createMethodExitRequest() | Creates a new disabled  MethodExitRequest. | 
| ModificationWatchpointRequest | createModificationWatchpointRequest | Creates a new disabled watchpoint which watches accesses to the specified field. | 
| MonitorContendedEnteredRequest | createMonitorContendedEnteredRequest() | Creates a new disabled  MonitorContendedEnteredRequest. | 
| MonitorContendedEnterRequest | createMonitorContendedEnterRequest() | Creates a new disabled  MonitorContendedEnterRequest. | 
| MonitorWaitedRequest | createMonitorWaitedRequest() | Creates a new disabled  MonitorWaitedRequest. | 
| MonitorWaitRequest | createMonitorWaitRequest() | Creates a new disabled  MonitorWaitRequest. | 
| StepRequest | createStepRequest | Creates a new disabled  StepRequest. | 
| ThreadDeathRequest | createThreadDeathRequest() | Creates a new disabled  ThreadDeathRequest. | 
| ThreadStartRequest | createThreadStartRequest() | Creates a new disabled  ThreadStartRequest. | 
| VMDeathRequest | createVMDeathRequest() | Creates a new disabled  VMDeathRequest. | 
| void | deleteAllBreakpoints() | Remove all breakpoints managed by this EventRequestManager. | 
| void | deleteEventRequest | Removes an eventRequest. | 
| void | deleteEventRequests | Removes a list of  EventRequests. | 
| List | exceptionRequests() | Return an unmodifiable list of the enabled and disabled exception requests. | 
| List | methodEntryRequests() | Return an unmodifiable list of the enabled and disabled method entry requests. | 
| List | methodExitRequests() | Return an unmodifiable list of the enabled and disabled method exit requests. | 
| List | modificationWatchpointRequests() | Return an unmodifiable list of the enabled and disabled modification watchpoint requests. | 
| List | monitorContendedEnteredRequests() | Return an unmodifiable list of the enabled and disabled monitor contended entered requests. | 
| List | monitorContendedEnterRequests() | Return an unmodifiable list of the enabled and disabled monitor contended enter requests. | 
| List | monitorWaitedRequests() | Return an unmodifiable list of the enabled and disabled monitor waited requests. | 
| List | monitorWaitRequests() | Return an unmodifiable list of the enabled and disabled monitor wait requests. | 
| List | stepRequests() | Return an unmodifiable list of the enabled and disabled step requests. | 
| List | threadDeathRequests() | Return an unmodifiable list of the enabled and disabled thread death requests. | 
| List | threadStartRequests() | Return an unmodifiable list of the enabled and disabled thread start requests. | 
| List | vmDeathRequests() | Return an unmodifiable list of the enabled and disabled VM death requests. | 
toString, virtualMachine
ClassPrepareRequest createClassPrepareRequest()
ClassPrepareRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.ClassPrepareRequest
ClassUnloadRequest createClassUnloadRequest()
ClassUnloadRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.ClassUnloadRequest
ThreadStartRequest createThreadStartRequest()
ThreadStartRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.ThreadStartRequest
ThreadDeathRequest createThreadDeathRequest()
ThreadDeathRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.ThreadDeathRequest
ExceptionRequest createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught)
ExceptionRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.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 ExceptionEvent.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 reportednotifyCaught - If true, caught exceptions will be reported.notifyUncaught - If true, uncaught exceptions will be reported.ExceptionRequest
MethodEntryRequest createMethodEntryRequest()
MethodEntryRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.MethodEntryRequest
MethodExitRequest createMethodExitRequest()
MethodExitRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.MethodExitRequest
MonitorContendedEnterRequest createMonitorContendedEnterRequest()
MonitorContendedEnterRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.MonitorContendedEnterRequest
UnsupportedOperationException - if the target VM does not support this operation.MonitorContendedEnteredRequest createMonitorContendedEnteredRequest()
MonitorContendedEnteredRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.MonitorContendedEnteredRequest
UnsupportedOperationException - if the target VM does not support this operation.MonitorWaitRequest createMonitorWaitRequest()
MonitorWaitRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.MonitorWaitRequest
UnsupportedOperationException - if the target VM does not support this operation.MonitorWaitedRequest createMonitorWaitedRequest()
MonitorWaitedRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.MonitorWaitedRequest
UnsupportedOperationException - if the target VM does not support this operation.StepRequest createStepRequest(ThreadReference thread, int size, int depth)
StepRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.  The returned request will control stepping only in the specified thread; all other threads will be unaffected. A size value of StepRequest.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 StepRequest.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 VirtualMachine.redefineClasses(java.util.Map<? extends com.sun.jdi.ReferenceType, byte[]>) operation. A depth value of StepRequest.STEP_INTO will generate step events in any called methods. A depth value of StepRequest.STEP_OVER restricts step events to the current frame or caller frames. A depth value of StepRequest.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.{@link VirtualMachine#eventRequestManager eventRequestManager}();
     StepRequest request = mgr.createStepRequest(myThread,
                                                 StepRequest.{@link StepRequest#STEP_LINE STEP_LINE},
                                                 StepRequest.{@link StepRequest#STEP_OVER STEP_OVER});
     request.{@link EventRequest#addCountFilter addCountFilter}(1);  // next step only
     request.enable();
     myVM.{@link VirtualMachine#resume resume}();
 thread - the thread in which to stepsize - the step sizedepth - the step depthStepRequest
DuplicateRequestException - if there is already a pending step request for the specified thread.IllegalArgumentException - if the size or depth arguments contain illegal values.BreakpointRequest createBreakpointRequest(Location location)
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 EventRequest.enable() to activate this event request.location - the location of the new breakpoint.BreakpointRequest
NativeMethodException - if location is within a native method.AccessWatchpointRequest createAccessWatchpointRequest(Field field)
EventRequest.enable() to activate this event request.  Not all target virtual machines support this operation. Use VirtualMachine.canWatchFieldAccess() to determine if the operation is supported.
field - the field to watchUnsupportedOperationException - if the target virtual machine does not support this operation.ModificationWatchpointRequest createModificationWatchpointRequest(Field field)
EventRequest.enable() to activate this event request.  Not all target virtual machines support this operation. Use VirtualMachine.canWatchFieldModification() to determine if the operation is supported.
field - the field to watchUnsupportedOperationException - if the target virtual machine does not support this operation.VMDeathRequest createVMDeathRequest()
VMDeathRequest. The new request is added to the list managed by this EventRequestManager. Use EventRequest.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 VirtualMachine.canRequestVMDeathEvent() to determine if the operation is supported.
UnsupportedOperationException - if the target VM does not support this operation.void deleteEventRequest(EventRequest eventRequest)
EventRequest.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 removevoid deleteEventRequests(List<? extends EventRequest> eventRequests)
EventRequests.eventRequests - the list of eventRequests to removevoid deleteAllBreakpoints()
List<StepRequest> stepRequests()
StepRequest objects.List<ClassPrepareRequest> classPrepareRequests()
ClassPrepareRequest objects.List<ClassUnloadRequest> classUnloadRequests()
ClassUnloadRequest objects.List<ThreadStartRequest> threadStartRequests()
ThreadStartRequest objects.List<ThreadDeathRequest> threadDeathRequests()
ThreadDeathRequest objects.List<ExceptionRequest> exceptionRequests()
ExceptionRequest objects.List<BreakpointRequest> breakpointRequests()
BreakpointRequest objects.List<AccessWatchpointRequest> accessWatchpointRequests()
AccessWatchpointRequest objects.List<ModificationWatchpointRequest> modificationWatchpointRequests()
ModificationWatchpointRequest objects.List<MethodEntryRequest> methodEntryRequests()
MethodEntryRequest objects.List<MethodExitRequest> methodExitRequests()
MethodExitRequest objects.List<MonitorContendedEnterRequest> monitorContendedEnterRequests()
MonitorContendedEnterRequest objects.List<MonitorContendedEnteredRequest> monitorContendedEnteredRequests()
MonitorContendedEnteredRequest objects.List<MonitorWaitRequest> monitorWaitRequests()
MonitorWaitRequest objects.List<MonitorWaitedRequest> monitorWaitedRequests()
MonitorWaitedRequest objects.List<VMDeathRequest> vmDeathRequests()
VMDeathRequest objects.
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/jdk.jdi/com/sun/jdi/request/EventRequestManager.html