Top Description Methods
com.sun.jdi.event

public Interface EventQueue

extends Mirror
Known Direct Implementers
com.sun.tools.jdi.EventQueueImpl
Imports
com.sun.jdi.Mirror, .VMDisconnectedException, .VirtualMachine, com.sun.jdi.request.EventRequest

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().

Author
Robert Field
Since
1.3
See Also
EventSet, VirtualMachine

Method Summary

Modifier and TypeMethod and Description
public EventSet

Returns:

the next EventSet.
remove
()

Waits forever for the next available event.

public EventSet

Returns:

the next EventSet, or null if there is a timeout.
remove
(long
Time in milliseconds to wait for the next event
timeout
)

Waits a specified time for the next available event.

Inherited from com.sun.jdi.Mirror:
toStringvirtualMachine

Method Detail

removeback to summary
public EventSet remove() throws InterruptedException

Waits forever for the next available event.

Returns:EventSet

the next EventSet.

Exceptions
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.
removeback to summary
public EventSet remove(long timeout) throws InterruptedException

Waits a specified time for the next available event.

Parameters
timeout:long

Time in milliseconds to wait for the next event

Returns:EventSet

the next EventSet, or null if there is a timeout.

Exceptions
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.