- 
- All Superinterfaces:
- Mirror
 
 
 public interface EventRequestManager extends Mirror Manages the creation and deletion ofEventRequests. A single implementor of this interface exists in a particuar VM and is accessed throughVirtualMachine.eventRequestManager()- Since:
- 1.3
- See Also:
- EventRequest,- Event,- BreakpointRequest,- BreakpointEvent,- VirtualMachine
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description List<AccessWatchpointRequest>accessWatchpointRequests()Return an unmodifiable list of the enabled and disabled access watchpoint requests.List<BreakpointRequest>breakpointRequests()Return an unmodifiable list of the enabled and disabled breakpoint requests.List<ClassPrepareRequest>classPrepareRequests()Return an unmodifiable list of the enabled and disabled class prepare requests.List<ClassUnloadRequest>classUnloadRequests()Return an unmodifiable list of the enabled and disabled class unload requests.AccessWatchpointRequestcreateAccessWatchpointRequest(Field field)Creates a new disabled watchpoint which watches accesses to the specified field.BreakpointRequestcreateBreakpointRequest(Location location)Creates a new disabledBreakpointRequest.ClassPrepareRequestcreateClassPrepareRequest()Creates a new disabledClassPrepareRequest.ClassUnloadRequestcreateClassUnloadRequest()Creates a new disabledClassUnloadRequest.ExceptionRequestcreateExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught)Creates a new disabledExceptionRequest.MethodEntryRequestcreateMethodEntryRequest()Creates a new disabledMethodEntryRequest.MethodExitRequestcreateMethodExitRequest()Creates a new disabledMethodExitRequest.ModificationWatchpointRequestcreateModificationWatchpointRequest(Field field)Creates a new disabled watchpoint which watches accesses to the specified field.MonitorContendedEnteredRequestcreateMonitorContendedEnteredRequest()Creates a new disabledMonitorContendedEnteredRequest.MonitorContendedEnterRequestcreateMonitorContendedEnterRequest()Creates a new disabledMonitorContendedEnterRequest.MonitorWaitedRequestcreateMonitorWaitedRequest()Creates a new disabledMonitorWaitedRequest.MonitorWaitRequestcreateMonitorWaitRequest()Creates a new disabledMonitorWaitRequest.StepRequestcreateStepRequest(ThreadReference thread, int size, int depth)Creates a new disabledStepRequest.ThreadDeathRequestcreateThreadDeathRequest()Creates a new disabledThreadDeathRequest.ThreadStartRequestcreateThreadStartRequest()Creates a new disabledThreadStartRequest.VMDeathRequestcreateVMDeathRequest()Creates a new disabledVMDeathRequest.voiddeleteAllBreakpoints()Remove all breakpoints managed by this EventRequestManager.voiddeleteEventRequest(EventRequest eventRequest)Removes an eventRequest.voiddeleteEventRequests(List<? extends EventRequest> eventRequests)Removes a list ofEventRequests.List<ExceptionRequest>exceptionRequests()Return an unmodifiable list of the enabled and disabled exception requests.List<MethodEntryRequest>methodEntryRequests()Return an unmodifiable list of the enabled and disabled method entry requests.List<MethodExitRequest>methodExitRequests()Return an unmodifiable list of the enabled and disabled method exit requests.List<ModificationWatchpointRequest>modificationWatchpointRequests()Return an unmodifiable list of the enabled and disabled modification watchpoint requests.List<MonitorContendedEnteredRequest>monitorContendedEnteredRequests()Return an unmodifiable list of the enabled and disabled monitor contended entered requests.List<MonitorContendedEnterRequest>monitorContendedEnterRequests()Return an unmodifiable list of the enabled and disabled monitor contended enter requests.List<MonitorWaitedRequest>monitorWaitedRequests()Return an unmodifiable list of the enabled and disabled monitor waited requests.List<MonitorWaitRequest>monitorWaitRequests()Return an unmodifiable list of the enabled and disabled monitor wait requests.List<StepRequest>stepRequests()Return an unmodifiable list of the enabled and disabled step requests.List<ThreadDeathRequest>threadDeathRequests()Return an unmodifiable list of the enabled and disabled thread death requests.List<ThreadStartRequest>threadStartRequests()Return an unmodifiable list of the enabled and disabled thread start requests.List<VMDeathRequest>vmDeathRequests()Return an unmodifiable list of the enabled and disabled VM death requests.- 
Methods inherited from interface com.sun.jdi.MirrortoString, virtualMachine
 
- 
 
- 
- 
- 
Method Detail- 
createClassPrepareRequestClassPrepareRequest createClassPrepareRequest() Creates a new disabledClassPrepareRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.- Returns:
- the created ClassPrepareRequest
 
 - 
createClassUnloadRequestClassUnloadRequest createClassUnloadRequest() Creates a new disabledClassUnloadRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.- Returns:
- the created ClassUnloadRequest
 
 - 
createThreadStartRequestThreadStartRequest createThreadStartRequest() Creates a new disabledThreadStartRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.- Returns:
- the created ThreadStartRequest
 
 - 
createThreadDeathRequestThreadDeathRequest createThreadDeathRequest() Creates a new disabledThreadDeathRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.- Returns:
- the created ThreadDeathRequest
 
 - 
createExceptionRequestExceptionRequest createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught) Creates a new disabledExceptionRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.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.- Parameters:
- 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.
- Returns:
- the created ExceptionRequest
 
 - 
createMethodEntryRequestMethodEntryRequest createMethodEntryRequest() Creates a new disabledMethodEntryRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.- Returns:
- the created MethodEntryRequest
 
 - 
createMethodExitRequestMethodExitRequest createMethodExitRequest() Creates a new disabledMethodExitRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.- Returns:
- the created MethodExitRequest
 
 - 
createMonitorContendedEnterRequestMonitorContendedEnterRequest createMonitorContendedEnterRequest() Creates a new disabledMonitorContendedEnterRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request. Not all target virtual machines support this operation. UseVirtualMachine.canRequestMonitorEvents()to determine if the operation is supported.- Returns:
- the created MonitorContendedEnterRequest
- Throws:
- UnsupportedOperationException- if the target VM does not support this operation.
- Since:
- 1.6
 
 - 
createMonitorContendedEnteredRequestMonitorContendedEnteredRequest createMonitorContendedEnteredRequest() Creates a new disabledMonitorContendedEnteredRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request. Not all target virtual machines support this operation. UseVirtualMachine.canRequestMonitorEvents()to determine if the operation is supported.- Returns:
- the created MonitorContendedEnteredRequest
- Throws:
- UnsupportedOperationException- if the target VM does not support this operation.
- Since:
- 1.6
 
 - 
createMonitorWaitRequestMonitorWaitRequest createMonitorWaitRequest() Creates a new disabledMonitorWaitRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request. Not all target virtual machines support this operation. UseVirtualMachine.canRequestMonitorEvents()to determine if the operation is supported.- Returns:
- the created MonitorWaitRequest
- Throws:
- UnsupportedOperationException- if the target VM does not support this operation.
- Since:
- 1.6
 
 - 
createMonitorWaitedRequestMonitorWaitedRequest createMonitorWaitedRequest() Creates a new disabledMonitorWaitedRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request. Not all target virtual machines support this operation. UseVirtualMachine.canRequestMonitorEvents()to determine if the operation is supported.- Returns:
- the created MonitorWaitedRequest
- Throws:
- UnsupportedOperationException- if the target VM does not support this operation.
- Since:
- 1.6
 
 - 
createStepRequestStepRequest createStepRequest(ThreadReference thread, int size, int depth) Creates a new disabledStepRequest. The new event request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.The returned request will control stepping only in the specified thread; all other threads will be unaffected. Asizevalue ofStepRequest.STEP_MINwill generate a step event each time the code index changes. It represents the smallest step size available and often maps to the instruction level. Asizevalue ofStepRequest.STEP_LINEwill 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 aVirtualMachine.redefineClasses(java.util.Map<? extends com.sun.jdi.ReferenceType, byte[]>)operation. Adepthvalue ofStepRequest.STEP_INTOwill generate step events in any called methods. Adepthvalue ofStepRequest.STEP_OVERrestricts step events to the current frame or caller frames. Adepthvalue ofStepRequest.STEP_OUTrestricts 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}();- Parameters:
- thread- the thread in which to step
- depth- the step depth
- size- the step size
- Returns:
- the created StepRequest
- Throws:
- DuplicateRequestException- if there is already a pending step request for the specified thread.
- IllegalArgumentException- if the size or depth arguments contain illegal values.
 
 - 
createBreakpointRequestBreakpointRequest createBreakpointRequest(Location location) Creates a new disabledBreakpointRequest. The givenLocationmust 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. UseEventRequest.enable()to activate this event request.- Parameters:
- location- the location of the new breakpoint.
- Returns:
- the created BreakpointRequest
- Throws:
- NativeMethodException- if location is within a native method.
 
 - 
createAccessWatchpointRequestAccessWatchpointRequest createAccessWatchpointRequest(Field field) 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. UseEventRequest.enable()to activate this event request.Not all target virtual machines support this operation. Use VirtualMachine.canWatchFieldAccess()to determine if the operation is supported.- Parameters:
- field- the field to watch
- Returns:
- the created watchpoint
- Throws:
- UnsupportedOperationException- if the target virtual machine does not support this operation.
 
 - 
createModificationWatchpointRequestModificationWatchpointRequest createModificationWatchpointRequest(Field field) 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. UseEventRequest.enable()to activate this event request.Not all target virtual machines support this operation. Use VirtualMachine.canWatchFieldModification()to determine if the operation is supported.- Parameters:
- field- the field to watch
- Returns:
- the created watchpoint
- Throws:
- UnsupportedOperationException- if the target virtual machine does not support this operation.
 
 - 
createVMDeathRequestVMDeathRequest createVMDeathRequest() Creates a new disabledVMDeathRequest. The new request is added to the list managed by this EventRequestManager. UseEventRequest.enable()to activate this event request.This request (if enabled) will cause a VMDeathEventto be sent on termination of the target VM.A VMDeathRequest with a suspend policy of SUSPEND_ALLcan be used to assure processing of incomingSUSPEND_NONEorSUSPEND_EVENT_THREADevents 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 theEventSetcontaining theVMDeathEventis resumed.Not all target virtual machines support this operation. Use VirtualMachine.canRequestVMDeathEvent()to determine if the operation is supported.- Returns:
- the created request
- Throws:
- UnsupportedOperationException- if the target VM does not support this operation.
- Since:
- 1.4
 
 - 
deleteEventRequestvoid deleteEventRequest(EventRequest eventRequest) 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,EventRequest.setEnabled(boolean)) are permitted - attempts to do so will generally cause anInvalidRequestStateException. 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 aConcurrentModificationException. Instead usedeleteEventRequests(List)or copy the list before iterating.- Parameters:
- eventRequest- the eventRequest to remove
 
 - 
deleteEventRequestsvoid deleteEventRequests(List<? extends EventRequest> eventRequests) Removes a list ofEventRequests.- Parameters:
- eventRequests- the list of eventRequests to remove
- See Also:
- deleteEventRequest(EventRequest)
 
 - 
deleteAllBreakpointsvoid deleteAllBreakpoints() Remove all breakpoints managed by this EventRequestManager.- See Also:
- deleteEventRequest(EventRequest)
 
 - 
stepRequestsList<StepRequest> stepRequests() 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.- Returns:
- the all StepRequestobjects.
 
 - 
classPrepareRequestsList<ClassPrepareRequest> classPrepareRequests() 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.- Returns:
- the all ClassPrepareRequestobjects.
 
 - 
classUnloadRequestsList<ClassUnloadRequest> classUnloadRequests() 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.- Returns:
- the all ClassUnloadRequestobjects.
 
 - 
threadStartRequestsList<ThreadStartRequest> threadStartRequests() 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.- Returns:
- the all ThreadStartRequestobjects.
 
 - 
threadDeathRequestsList<ThreadDeathRequest> threadDeathRequests() 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.- Returns:
- the all ThreadDeathRequestobjects.
 
 - 
exceptionRequestsList<ExceptionRequest> exceptionRequests() 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.- Returns:
- the all ExceptionRequestobjects.
 
 - 
breakpointRequestsList<BreakpointRequest> breakpointRequests() 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.- Returns:
- the list of all BreakpointRequestobjects.
 
 - 
accessWatchpointRequestsList<AccessWatchpointRequest> accessWatchpointRequests() 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.- Returns:
- the all AccessWatchpointRequestobjects.
 
 - 
modificationWatchpointRequestsList<ModificationWatchpointRequest> modificationWatchpointRequests() 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.- Returns:
- the all ModificationWatchpointRequestobjects.
 
 - 
methodEntryRequestsList<MethodEntryRequest> methodEntryRequests() 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.- Returns:
- the list of all MethodEntryRequestobjects.
 
 - 
methodExitRequestsList<MethodExitRequest> methodExitRequests() 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.- Returns:
- the list of all MethodExitRequestobjects.
 
 - 
monitorContendedEnterRequestsList<MonitorContendedEnterRequest> monitorContendedEnterRequests() 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.- Returns:
- the list of all MonitorContendedEnterRequestobjects.
- Since:
- 1.6
 
 - 
monitorContendedEnteredRequestsList<MonitorContendedEnteredRequest> monitorContendedEnteredRequests() 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.- Returns:
- the list of all MonitorContendedEnteredRequestobjects.
- Since:
- 1.6
 
 - 
monitorWaitRequestsList<MonitorWaitRequest> monitorWaitRequests() 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.- Returns:
- the list of all MonitorWaitRequestobjects.
- Since:
- 1.6
 
 - 
monitorWaitedRequestsList<MonitorWaitedRequest> monitorWaitedRequests() 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.- Returns:
- the list of all MonitorWaitedRequestobjects.
- Since:
- 1.6
 
 - 
vmDeathRequestsList<VMDeathRequest> vmDeathRequests() 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.- Returns:
- the list of all VMDeathRequestobjects.
- Since:
- 1.4
 
 
- 
 
-