-
- All Superinterfaces:
Mirror
public interface EventQueue extends Mirror
Manager of incoming debugger events for a target VM. Events are always grouped inEventSet
s. EventSets generated by the debugger back end can be read here. There is one instance of EventQueue assigned to a particularVirtualMachine
.Some events cause the suspension of the target VM - event requests (
com.sun.jdi.request
) with asuspend policy
ofSUSPEND_ALL
orSUSPEND_EVENT_THREAD
and sometimesVMStartEvent
. If these suspensions are not resumed the target VM will hang. Thus, it is always good policy toremove()
every EventSet from the event queue until an EventSet containing aVMDisconnectEvent
is read. Unlessresume
is being handled in another way, each EventSet should invokeEventSet.resume()
.- Since:
- 1.3
- See Also:
EventSet
,VirtualMachine
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EventSet
remove()
Waits forever for the next available event.EventSet
remove(long timeout)
Waits a specified time for the next available event.-
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
-
-
-
-
Method Detail
-
remove
EventSet remove() throws InterruptedException
Waits forever for the next available event.- Returns:
- the next
EventSet
. - Throws:
InterruptedException
- if any thread has interrupted this thread.VMDisconnectedException
- if the connection to the target VM is no longer available. Note this will always be preceded by aVMDisconnectEvent
.
-
remove
EventSet remove(long timeout) throws InterruptedException
Waits a specified time for the next available event.- Parameters:
timeout
- Time in milliseconds to wait for the next event- Returns:
- the next
EventSet
, or null if there is a timeout. - Throws:
InterruptedException
- if any thread has interrupted this thread.VMDisconnectedException
- if the connection to the target VM is no longer available. Note this will always be preceded by aVMDisconnectEvent
.IllegalArgumentException
- if the timeout argument contains an illegal value.
-
-