-
public interface EventSet extends Mirror, Set<Event>
SeveralEvent
objects may be created at a given time by the targetVirtualMachine
. For example, there may be more than oneBreakpointRequest
for a givenLocation
or you might single step to the same location as a BreakpointRequest. TheseEvent
objects are delivered together as an EventSet. For uniformity, an EventSet is always used to deliverEvent
objects. EventSets are delivered by theEventQueue
. EventSets are unmodifiable.Associated with the issuance of an event set, suspensions may have occurred in the target VM. These suspensions correspond with the
suspend policy
. To assure matching resumes occur, it is recommended, where possible, to complete the processing of an event set withEventSet.resume()
.The events that are grouped in an EventSet are restricted in the following ways:
- Always singleton sets:
- Only with other VMDeathEvents:
- Only with other ThreadStartEvents for the same thread:
- Only with other ThreadDeathEvents for the same thread:
- Only with other ClassPrepareEvents for the same class:
- Only with other ClassUnloadEvents for the same class:
- Only with other AccessWatchpointEvents for the same field access:
- Only with other ModificationWatchpointEvents for the same field modification:
- Only with other ExceptionEvents for the same exception occurrance:
- Only with other MethodExitEvents for the same method exit:
- Only with other Monitor contended enter events for the same monitor object:
- Monitor Contended Enter Event
- Only with other Monitor contended entered events for the same monitor object:
- Monitor Contended Entered Event
- Only with other Monitor wait events for the same monitor object:
- Monitor Wait Event
- Only with other Monitor waited events for the same monitor object:
- Monitor Waited Event
- Only with other members of this group, at the same location and in the same thread:
- Since:
- 1.3
- See Also:
Event
,EventQueue
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EventIterator
eventIterator()
Return an iterator specific toEvent
objects.void
resume()
Resumes threads suspended by this event set.int
suspendPolicy()
Returns the policy used to suspend threads in the target VM for this event set.-
Methods declared in interface java.util.Collection
parallelStream, removeIf, stream
-
Methods declared in interface com.sun.jdi.Mirror
toString, virtualMachine
-
-
-
-
Method Detail
-
suspendPolicy
int suspendPolicy()
Returns the policy used to suspend threads in the target VM for this event set. This policy is selected from the suspend policies for each event's request; the target VM chooses the policy which suspends the most threads. The target VM suspends threads according to that policy and that policy is returned here. SeeEventRequest
for the possible policy values.In rare cases, the suspend policy may differ from the requested value if a
ClassPrepareEvent
has occurred in a debugger system thread. SeeClassPrepareEvent.thread()
for details.- Returns:
- the suspendPolicy which is either
SUSPEND_ALL
,SUSPEND_EVENT_THREAD
orSUSPEND_NONE
.
-
eventIterator
EventIterator eventIterator()
Return an iterator specific toEvent
objects.
-
resume
void resume()
Resumes threads suspended by this event set. If thesuspendPolicy()
isEventRequest.SUSPEND_ALL
, a call to this method is equivalent toVirtualMachine.resume()
. If the suspend policy isEventRequest.SUSPEND_EVENT_THREAD
, a call to this method is equivalent toThreadReference.resume()
for the event thread. Otherwise, a call to this method is a no-op.
-
-