Represents a request for notification of an event. Examples include {@link BreakpointRequest} and {@link ExceptionRequest}. When an event occurs for which an enabled request is present, an {@link com.sun.jdi.event.EventSet EventSet} willbe placed on the {@link com.sun.jdi.event.EventQueue EventQueue}. The collection of existing event requests is managed by the {@link 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 {@link 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 {@link com.sun.jdi.VMDisconnectedException} if the target VM isdisconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or isavailable to be read from the {@link com.sun.jdi.event.EventQueue}.
Any method on EventRequest
which takes EventRequest
as an parameter may throw {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
@see com.sun.jdi.event.BreakpointEvent
@see com.sun.jdi.event.EventQueue
@see EventRequestManager
@author Robert Field
@since 1.3