Module jdk.jdi

Interface EventRequest

All Superinterfaces:
Mirror
All Known Subinterfaces:
AccessWatchpointRequest, BreakpointRequest, ClassPrepareRequest, ClassUnloadRequest, ExceptionRequest, MethodEntryRequest, MethodExitRequest, ModificationWatchpointRequest, MonitorContendedEnteredRequest, MonitorContendedEnterRequest, MonitorWaitedRequest, MonitorWaitRequest, StepRequest, ThreadDeathRequest, ThreadStartRequest, VMDeathRequest, WatchpointRequest

public interface EventRequest extends Mirror
Represents a request for notification of an event. Examples include BreakpointRequest and ExceptionRequest. When an event occurs for which an enabled request is present, an EventSet will be placed on the EventQueue. The collection of existing event requests is managed by the EventRequestManager.

The number of events generated for an event request can be controlled through filters. Filters provide additional constraints that an event must satisfy before it is placed on the event queue. Multiple filters can be used by making multiple calls to filter addition methods such as ExceptionRequest.addClassFilter(java.lang.String classPattern). Filters are added to an event one at a time only while the event is disabled. Multiple filters are applied with CUT-OFF AND, in the order it was added to the request. Only events that satisfy all filters are placed in the event queue.

The set of available filters is dependent on the event request, some examples of filters are:

  • Thread filters allow control over the thread for which events are generated.
  • Class filters allow control over the class in which the event occurs.
  • Instance filters allow control over the instance in which the event occurs.
  • Count filters allow control over the number of times an event is reported.
Filters can dramatically improve debugger performance by reducing the amount of event traffic sent from the target VM to the debugger VM.

Any method on EventRequest which takes EventRequest as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

Any method on EventRequest which takes EventRequest as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

Since:
1.3
See Also: