2362N/A * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Manager of incoming debugger events for a target VM. 0N/A * Events are always grouped in {@link EventSet}s. 0N/A * EventSets generated by the debugger back end can be read 0N/A * here. There is one instance of EventQueue assigned to a particular 0N/A * {@link com.sun.jdi.VirtualMachine VirtualMachine}. 0N/A * Some events cause the suspension of the target VM - event requests 0N/A * ({@link com.sun.jdi.request}) with a 0N/A * {@link com.sun.jdi.request.EventRequest#suspendPolicy() suspend policy} 0N/A * of {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL SUSPEND_ALL} 0N/A * or {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD 0N/A * SUSPEND_EVENT_THREAD} and sometimes 0N/A * {@link VMStartEvent}. 0N/A * If these suspensions are not resumed the target VM will hang. 0N/A * Thus, it is always good policy to 0N/A * {@link #remove() remove()} every EventSet from the 0N/A * event queue until an EventSet containing a 0N/A * {@link VMDisconnectEvent} is read. 0N/A * Unless {@link com.sun.jdi.VirtualMachine#resume() resume} is 0N/A * being handled in another way, each EventSet should invoke 0N/A * {@link EventSet#resume()}. 0N/A * @see VirtualMachine 0N/A * @author Robert Field 0N/A * Waits forever for the next available event. 0N/A * @return the next {@link EventSet}. 0N/A * @throws InterruptedException if any thread has interrupted 0N/A * @throws com.sun.jdi.VMDisconnectedException if the connection 0N/A * to the target VM is no longer available. Note this will always 0N/A * be preceded by a {@link com.sun.jdi.event.VMDisconnectEvent}. 0N/A * Waits a specified time for the next available event. 0N/A * @param timeout Time in milliseconds to wait for the next event 0N/A * @return the next {@link EventSet}, or null if there is a timeout. 0N/A * @throws InterruptedException if any thread has interrupted 0N/A * @throws com.sun.jdi.VMDisconnectedException if the connection 0N/A * to the target VM is no longer available. Note this will always 0N/A * be preceded by a {@link com.sun.jdi.event.VMDisconnectEvent}. 0N/A * @throws IllegalArgumentException if the timeout argument 0N/A * contains an illegal value.