gnu.classpath.jdwp.event

Class EventRequest


public class EventRequest
extends Object

A class which represents a request by the debugger for an event in the VM. EventRequests usually have event filters associated with them, which allow the debugger to specify conditions under which the notification should be sent (specific thread, specific class, ignore count, etc).

Field Summary

static byte
EVENT_BREAKPOINT
Breakpoint event
static byte
EVENT_CLASS_LOAD
Class load event
static byte
EVENT_CLASS_PREPARE
Class prepare event
static byte
EVENT_CLASS_UNLOAD
Class unload event
static byte
EVENT_EXCEPTION
Exception event
static byte
EVENT_FIELD_ACCESS
Field access event
static byte
EVENT_FIELD_MODIFY
Field modify event
static byte
EVENT_FRAME_POP
Frame pop event
static byte
EVENT_METHOD_ENTRY
Method entry event
static byte
EVENT_METHOD_EXIT
Method exit event
static byte
EVENT_SINGLE_STEP
Single step event
static byte
EVENT_THREAD_END
Thread end/death event
static byte
EVENT_THREAD_START
Thread start event
static byte
EVENT_USER_DEFINED
User-defined event
static byte
EVENT_VM_DEATH
Virutal machine death
static byte
EVENT_VM_INIT
Virtual machine initialization/start
static byte
SUSPEND_ALL
Suspend all threads
static byte
SUSPEND_NONE
Do not suspend any threads
static byte
SUSPEND_THREAD
Suspend the thread in which the event occurred

Constructor Summary

EventRequest(byte kind, byte suspendPolicy)
Construct a new EventRequest
EventRequest(int id, byte kind, byte suspendPolicy)
Construct a new EventRequest with the given ID

Method Summary

void
addFilter(IEventFilter filter)
Creates a new event filter, adding it to this request
byte
getEventKind()
Returns the kind of event for this request
Collection<E>
getFilters()
Returns the filters attached to this request
int
getId()
Returns the request id of this request
byte
getSuspendPolicy()
Returns the suspend policy for this request
boolean
matches(Event theEvent)
Determines whether the given event matches this request
void
setId(int id)
Sets the id of the request (used for auto-generated events)

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

EVENT_BREAKPOINT

public static final byte EVENT_BREAKPOINT
Breakpoint event
Field Value:
2

EVENT_CLASS_LOAD

public static final byte EVENT_CLASS_LOAD
Class load event
Field Value:
10

EVENT_CLASS_PREPARE

public static final byte EVENT_CLASS_PREPARE
Class prepare event
Field Value:
8

EVENT_CLASS_UNLOAD

public static final byte EVENT_CLASS_UNLOAD
Class unload event
Field Value:
9

EVENT_EXCEPTION

public static final byte EVENT_EXCEPTION
Exception event
Field Value:
4

EVENT_FIELD_ACCESS

public static final byte EVENT_FIELD_ACCESS
Field access event
Field Value:
20

EVENT_FIELD_MODIFY

public static final byte EVENT_FIELD_MODIFY
Field modify event
Field Value:
21

EVENT_FRAME_POP

public static final byte EVENT_FRAME_POP
Frame pop event
Field Value:
3

EVENT_METHOD_ENTRY

public static final byte EVENT_METHOD_ENTRY
Method entry event
Field Value:
40

EVENT_METHOD_EXIT

public static final byte EVENT_METHOD_EXIT
Method exit event
Field Value:
41

EVENT_SINGLE_STEP

public static final byte EVENT_SINGLE_STEP
Single step event
Field Value:
1

EVENT_THREAD_END

public static final byte EVENT_THREAD_END
Thread end/death event
Field Value:
7

EVENT_THREAD_START

public static final byte EVENT_THREAD_START
Thread start event
Field Value:
6

EVENT_USER_DEFINED

public static final byte EVENT_USER_DEFINED
User-defined event
Field Value:
5

EVENT_VM_DEATH

public static final byte EVENT_VM_DEATH
Virutal machine death
Field Value:
99

EVENT_VM_INIT

public static final byte EVENT_VM_INIT
Virtual machine initialization/start
Field Value:
90

SUSPEND_ALL

public static final byte SUSPEND_ALL
Suspend all threads
Field Value:
2

SUSPEND_NONE

public static final byte SUSPEND_NONE
Do not suspend any threads
Field Value:
0

SUSPEND_THREAD

public static final byte SUSPEND_THREAD
Suspend the thread in which the event occurred
Field Value:
1

Constructor Details

EventRequest

public EventRequest(byte kind,
                    byte suspendPolicy)
Construct a new EventRequest
Parameters:
kind - the kind of event requested
suspendPolicy - how to suspend threads when event occurs

EventRequest

public EventRequest(int id,
                    byte kind,
                    byte suspendPolicy)
Construct a new EventRequest with the given ID
Parameters:
id - the id of the request to create
kind - the kind of event requested
suspendPolicy - how to suspend threads when event occurs

Method Details

addFilter

public void addFilter(IEventFilter filter)
            throws JdwpIllegalArgumentException
Creates a new event filter, adding it to this request
Parameters:
filter - the filter to add
Throws:
JdwpIllegalArgumentException - if an invalid or illegal filter is added to the request

getEventKind

public byte getEventKind()
Returns the kind of event for this request

getFilters

public Collection<E> getFilters()
Returns the filters attached to this request

getId

public int getId()
Returns the request id of this request

getSuspendPolicy

public byte getSuspendPolicy()
Returns the suspend policy for this request

matches

public boolean matches(Event theEvent)
Determines whether the given event matches this request
Parameters:
theEvent - the event to compare to

setId

public void setId(int id)
Sets the id of the request (used for auto-generated events)

EventRequest.java -- an event request from the debugger Copyright (C) 2005, 2006 Free Software Foundation This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.