EventQueue (Java SE 19 & JDK 19) (original) (raw)
All Superinterfaces:
[Mirror](../Mirror.html "interface in com.sun.jdi")
public interface EventQueueextends Mirror
Manager of incoming debugger events for a target VM. Events are always grouped in EventSets. 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 of SUSPEND_ALL or SUSPEND_EVENT_THREAD and sometimes VMStartEvent. 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 a VMDisconnectEvent is read. Unless resume is being handled in another way, each EventSet should invokeEventSet.resume().
Since:
1.3
See Also:
Method Summary
[remove](#remove%28%29)()
Waits forever for the next available event.[remove](#remove%28long%29)(long timeout)
Waits a specified time for the next available event.
Method Details
remove
Waits forever for the next available event.
Returns:
the next EventSet.
Throws:
[InterruptedException](../../../../../java.base/java/lang/InterruptedException.html "class in java.lang")
- if any thread has interrupted this thread.
[VMDisconnectedException](../VMDisconnectedException.html "class in com.sun.jdi")
- if the connection to the target VM is no longer available. Note this will always be preceded by a VMDisconnectEvent.remove
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](../../../../../java.base/java/lang/InterruptedException.html "class in java.lang")
- if any thread has interrupted this thread.
[VMDisconnectedException](../VMDisconnectedException.html "class in com.sun.jdi")
- if the connection to the target VM is no longer available. Note this will always be preceded by a VMDisconnectEvent.
[IllegalArgumentException](../../../../../java.base/java/lang/IllegalArgumentException.html "class in java.lang")
- if the timeout argument contains an illegal value.