Spec-Zone.ru › OpenJDK 25

Interface EventQueue

All Superinterfaces:
Mirror
public interface EventQueue extends 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 particular VirtualMachine.

Some events cause the suspension of the target VM - event requests (com.sun.jdi.request) with a suspend 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 to remove() 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 invoke EventSet.resume().

Since:
1.3
See Also:
  • EventSet
  • VirtualMachine

Method Summary

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 declared in interface Mirror

toString, virtualMachine

Method Details

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 a VMDisconnectEvent.

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 a VMDisconnectEvent.
IllegalArgumentException - if the timeout argument contains an illegal value.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jdi/com/sun/jdi/event/EventQueue.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API