blob: 18d0177d35463f4b67e6e090aa7c124a498c65b7 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 1998-2001 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26package com.sun.jdi.request;
27
28import com.sun.jdi.*;
29
30/**
31 * Identifies a {@link Location} in the target VM at which
32 * execution should be stopped. When an enabled BreakpointRequest is
33 * satisfied, an
34 * {@link com.sun.jdi.event.EventSet event set} containing an
35 * {@link com.sun.jdi.event.BreakpointEvent BreakpointEvent}
36 * will be placed on the
37 * {@link com.sun.jdi.event.EventQueue EventQueue} and
38 * the application is interrupted. The collection of existing breakpoints is
39 * managed by the {@link EventRequestManager}
40 *
41 * @see Location
42 * @see com.sun.jdi.event.BreakpointEvent
43 * @see com.sun.jdi.event.EventQueue
44 * @see EventRequestManager
45 *
46 * @author Robert Field
47 * @since 1.3
48 */
49public interface BreakpointRequest extends EventRequest, Locatable {
50
51 /**
52 * Returns the location of the requested breakpoint.
53 *
54 * @return the {@link Location} where this breakpoint has been set.
55 */
56 Location location();
57
58 /**
59 * Restricts the events generated by this request to those in
60 * the given thread.
61 * @param thread the thread to filter on.
62 * @throws InvalidRequestStateException if this request is currently
63 * enabled or has been deleted.
64 * Filters may be added only to disabled requests.
65 */
66 void addThreadFilter(ThreadReference thread);
67
68 /**
69 * Restricts the events generated by this request to those in
70 * which the currently executing instance is the object
71 * specified.
72 * <P>
73 * Not all targets support this operation.
74 * Use {@link VirtualMachine#canUseInstanceFilters()}
75 * to determine if the operation is supported.
76 * @since 1.4
77 * @param instance the object which must be the current instance
78 * in order to pass this filter.
79 * @throws java.lang.UnsupportedOperationException if
80 * the target virtual machine does not support this
81 * operation.
82 * @throws InvalidRequestStateException if this request is currently
83 * enabled or has been deleted.
84 * Filters may be added only to disabled requests.
85 */
86 void addInstanceFilter(ObjectReference instance);
87}