jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java
changeset 30037 3e785fad2c3b
parent 25859 3317bb8137f4
child 34894 3248b89d1921
equal deleted inserted replaced
30036:3d4eb4503c18 30037:3e785fad2c3b
    59  * is reported.
    59  * is reported.
    60  * </ul>
    60  * </ul>
    61  * Filters can dramatically improve debugger performance by reducing the
    61  * Filters can dramatically improve debugger performance by reducing the
    62  * amount of event traffic sent from the target VM to the debugger VM.
    62  * amount of event traffic sent from the target VM to the debugger VM.
    63  * <p>
    63  * <p>
    64  * Any method on <code>EventRequest</code> which
    64  * Any method on {@code EventRequest} which
    65  * takes <code>EventRequest</code> as an parameter may throw
    65  * takes {@code EventRequest} as an parameter may throw
    66  * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
    66  * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
    67  * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
    67  * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
    68  * available to be read from the {@link com.sun.jdi.event.EventQueue}.
    68  * available to be read from the {@link com.sun.jdi.event.EventQueue}.
    69  * <p>
    69  * <p>
    70  * Any method on <code>EventRequest</code> which
    70  * Any method on {@code EventRequest} which
    71  * takes <code>EventRequest</code> as an parameter may throw
    71  * takes {@code EventRequest} as an parameter may throw
    72  * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
    72  * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
    73  *
    73  *
    74  * @see com.sun.jdi.event.BreakpointEvent
    74  * @see com.sun.jdi.event.BreakpointEvent
    75  * @see com.sun.jdi.event.EventQueue
    75  * @see com.sun.jdi.event.EventQueue
    76  * @see EventRequestManager
    76  * @see EventRequestManager
    82 public interface EventRequest extends Mirror {
    82 public interface EventRequest extends Mirror {
    83 
    83 
    84     /**
    84     /**
    85      * Determines if this event request is currently enabled.
    85      * Determines if this event request is currently enabled.
    86      *
    86      *
    87      * @return <code>true</code> if enabled;
    87      * @return {@code true} if enabled;
    88      * <code>false</code> otherwise.
    88      * {@code false} otherwise.
    89      */
    89      */
    90     boolean isEnabled();
    90     boolean isEnabled();
    91 
    91 
    92     /**
    92     /**
    93      * Enables or disables this event request. While this event request is
    93      * Enables or disables this event request. While this event request is
    95      * will not be stopped if any of its threads reaches the
    95      * will not be stopped if any of its threads reaches the
    96      * event request.  Disabled event requests still exist,
    96      * event request.  Disabled event requests still exist,
    97      * and are included in event request lists such as
    97      * and are included in event request lists such as
    98      * {@link EventRequestManager#breakpointRequests()}.
    98      * {@link EventRequestManager#breakpointRequests()}.
    99      *
    99      *
   100      * @param val <code>true</code> if the event request is to be enabled;
   100      * @param val {@code true} if the event request is to be enabled;
   101      * <code>false</code> otherwise.
   101      * {@code false} otherwise.
   102      * @throws InvalidRequestStateException if this request
   102      * @throws InvalidRequestStateException if this request
   103      * has been deleted.
   103      * has been deleted.
   104      * @throws IllegalThreadStateException if this is a StepRequest,
   104      * @throws IllegalThreadStateException if this is a StepRequest,
   105      * <code>val</code> is <code>true</code>, and the
   105      * {@code val} is {@code true}, and the
   106      * thread named in the request has died or is not yet started.
   106      * thread named in the request has died or is not yet started.
   107      */
   107      */
   108     void setEnabled(boolean val);
   108     void setEnabled(boolean val);
   109 
   109 
   110     /**
   110     /**
   111      * Same as {@link #setEnabled <CODE>setEnabled(true)</CODE>}.
   111      * Same as {@link #setEnabled setEnabled(true)}.
   112      * @throws InvalidRequestStateException if this request
   112      * @throws InvalidRequestStateException if this request
   113      * has been deleted.
   113      * has been deleted.
   114      * @throws IllegalThreadStateException if this is a StepRequest
   114      * @throws IllegalThreadStateException if this is a StepRequest
   115      * and the thread named in the request has died or is not yet started.
   115      * and the thread named in the request has died or is not yet started.
   116      */
   116      */
   117     void enable();
   117     void enable();
   118 
   118 
   119     /**
   119     /**
   120      * Same as {@link #setEnabled <CODE>setEnabled(false)</CODE>}.
   120      * Same as {@link #setEnabled setEnabled(false)}.
   121      * @throws InvalidRequestStateException if this request
   121      * @throws InvalidRequestStateException if this request
   122      * has been deleted.
   122      * has been deleted.
   123      */
   123      */
   124     void disable();
   124     void disable();
   125 
   125 
   126     /**
   126     /**
   127      * Limit the requested event to be reported at most once after a
   127      * Limit the requested event to be reported at most once after a
   128      * given number of occurrences.  The event is not reported
   128      * given number of occurrences.  The event is not reported
   129      * the first <code>count - 1</code> times this filter is reached.
   129      * the first {@code count - 1} times this filter is reached.
   130      * To request a one-off event, call this method with a count of 1.
   130      * To request a one-off event, call this method with a count of 1.
   131      * <p>
   131      * <p>
   132      * Once the count reaches 0, any subsequent filters in this request
   132      * Once the count reaches 0, any subsequent filters in this request
   133      * are applied. If none of those filters cause the event to be
   133      * are applied. If none of those filters cause the event to be
   134      * suppressed, the event is reported. Otherwise, the event is not
   134      * suppressed, the event is reported. Otherwise, the event is not
   137      *
   137      *
   138      * @param count the number of ocurrences before generating an event.
   138      * @param count the number of ocurrences before generating an event.
   139      * @throws InvalidRequestStateException if this request is currently
   139      * @throws InvalidRequestStateException if this request is currently
   140      * enabled or has been deleted.
   140      * enabled or has been deleted.
   141      * Filters may be added only to disabled requests.
   141      * Filters may be added only to disabled requests.
   142      * @throws IllegalArgumentException if <CODE>count</CODE>
   142      * @throws IllegalArgumentException if {@code count}
   143      * is less than one.
   143      * is less than one.
   144      */
   144      */
   145     void addCountFilter(int count);
   145     void addCountFilter(int count);
   146 
   146 
   147     /** Suspend no threads when the event occurs */
   147     /** Suspend no threads when the event occurs */
   187      * The property can be used by a client of the JDI to
   187      * The property can be used by a client of the JDI to
   188      * associate application information with the request;
   188      * associate application information with the request;
   189      * These client-set properties are not used internally
   189      * These client-set properties are not used internally
   190      * by the JDI.
   190      * by the JDI.
   191      * <p>
   191      * <p>
   192      * The <code>get/putProperty</code> methods provide access to
   192      * The {@code get/putProperty} methods provide access to
   193      * a small per-instance map. This is <b>not</b> to be confused
   193      * a small per-instance map. This is <b>not</b> to be confused
   194      * with {@link java.util.Properties}.
   194      * with {@link java.util.Properties}.
   195      * <p>
   195      * <p>
   196      * If value is null this method will remove the property.
   196      * If value is null this method will remove the property.
   197      *
   197      *