Home » openjdk-7 » com.sun » jdi » request » [javadoc | source]
com.sun.jdi.request
public interface: EventRequestManager [javadoc | source]

All Implemented Interfaces:
    Mirror

All Known Implementing Classes:
    EventRequestManagerImpl

Manages the creation and deletion of EventRequest s. A single implementor of this interface exists in a particuar VM and is accessed through VirtualMachine#eventRequestManager()
Method from com.sun.jdi.request.EventRequestManager Summary:
accessWatchpointRequests,   breakpointRequests,   classPrepareRequests,   classUnloadRequests,   createAccessWatchpointRequest,   createBreakpointRequest,   createClassPrepareRequest,   createClassUnloadRequest,   createExceptionRequest,   createMethodEntryRequest,   createMethodExitRequest,   createModificationWatchpointRequest,   createMonitorContendedEnterRequest,   createMonitorContendedEnteredRequest,   createMonitorWaitRequest,   createMonitorWaitedRequest,   createStepRequest,   createThreadDeathRequest,   createThreadStartRequest,   createVMDeathRequest,   deleteAllBreakpoints,   deleteEventRequest,   deleteEventRequests,   exceptionRequests,   methodEntryRequests,   methodExitRequests,   modificationWatchpointRequests,   monitorContendedEnterRequests,   monitorContendedEnteredRequests,   monitorWaitRequests,   monitorWaitedRequests,   stepRequests,   threadDeathRequests,   threadStartRequests,   vmDeathRequests
Method from com.sun.jdi.request.EventRequestManager Detail:
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public AccessWatchpointRequest 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. Use 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.

 public BreakpointRequest createBreakpointRequest(Location location)
    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 EventRequest#enable() to activate this event request.
 public ClassPrepareRequest createClassPrepareRequest()
 public ClassUnloadRequest createClassUnloadRequest()
 public ExceptionRequest createExceptionRequest(ReferenceType refType,
    boolean notifyCaught,
    boolean notifyUncaught)
    Creates a new disabled 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 com.sun.jdi.event.ExceptionEvent#catchLocation for details.

 public MethodEntryRequest createMethodEntryRequest()
 public MethodExitRequest createMethodExitRequest()
 public ModificationWatchpointRequest 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. Use 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.

 public MonitorContendedEnterRequest createMonitorContendedEnterRequest()
 public MonitorContendedEnteredRequest createMonitorContendedEnteredRequest()
 public MonitorWaitRequest createMonitorWaitRequest()
 public MonitorWaitedRequest createMonitorWaitedRequest()
 public StepRequest createStepRequest(ThreadReference thread,
    int size,
    int depth)
    Creates a new disabled 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 sizevalue of com.sun.jdi.request.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 com.sun.jdi.request.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 com.sun.jdi.VirtualMachine#redefineClasses operation. A depth value of com.sun.jdi.request.StepRequest#STEP_INTO will generate step events in any called methods. A depth value of com.sun.jdi.request.StepRequest#STEP_OVER restricts step events to the current frame or caller frames. A depth value of com.sun.jdi.request.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. eventRequestManager ();
        StepRequest request = mgr.createStepRequest(myThread,
                                                    StepRequest. STEP_LINE ,
                                                    StepRequest. STEP_OVER );
        request. addCountFilter (1);  // next step only
        request.enable();
        myVM. resume ();
    
 public ThreadDeathRequest createThreadDeathRequest()
 public ThreadStartRequest createThreadStartRequest()
 public VMDeathRequest createVMDeathRequest()
 public  void deleteAllBreakpoints()
    Remove all breakpoints managed by this EventRequestManager.
 public  void 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 ) 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 java.util.ConcurrentModificationException . Instead use deleteEventRequests(List) or copy the list before iterating.
 public  void deleteEventRequests(List<EventRequest> eventRequests)
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.
 public List<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.