1 11 package org.eclipse.jdi.internal.request; 12 13 14 import java.util.ArrayList ; 15 import java.util.Enumeration ; 16 import java.util.HashSet ; 17 import java.util.Hashtable ; 18 import java.util.Iterator ; 19 import java.util.List ; 20 21 import org.eclipse.jdi.internal.FieldImpl; 22 import org.eclipse.jdi.internal.LocationImpl; 23 import org.eclipse.jdi.internal.MirrorImpl; 24 import org.eclipse.jdi.internal.ReferenceTypeImpl; 25 import org.eclipse.jdi.internal.ThreadReferenceImpl; 26 import org.eclipse.jdi.internal.VirtualMachineImpl; 27 import org.eclipse.jdi.internal.event.AccessWatchpointEventImpl; 28 import org.eclipse.jdi.internal.event.BreakpointEventImpl; 29 import org.eclipse.jdi.internal.event.ClassPrepareEventImpl; 30 import org.eclipse.jdi.internal.event.ClassUnloadEventImpl; 31 import org.eclipse.jdi.internal.event.EventImpl; 32 import org.eclipse.jdi.internal.event.ExceptionEventImpl; 33 import org.eclipse.jdi.internal.event.MethodEntryEventImpl; 34 import org.eclipse.jdi.internal.event.MethodExitEventImpl; 35 import org.eclipse.jdi.internal.event.ModificationWatchpointEventImpl; 36 import org.eclipse.jdi.internal.event.MonitorContendedEnterEventImpl; 37 import org.eclipse.jdi.internal.event.MonitorContendedEnteredEventImpl; 38 import org.eclipse.jdi.internal.event.MonitorWaitEventImpl; 39 import org.eclipse.jdi.internal.event.MonitorWaitedEventImpl; 40 import org.eclipse.jdi.internal.event.StepEventImpl; 41 import org.eclipse.jdi.internal.event.ThreadDeathEventImpl; 42 import org.eclipse.jdi.internal.event.ThreadStartEventImpl; 43 import org.eclipse.jdi.internal.event.VMDeathEventImpl; 44 45 import com.ibm.icu.text.MessageFormat; 46 import com.sun.jdi.Field; 47 import com.sun.jdi.Location; 48 import com.sun.jdi.ObjectCollectedException; 49 import com.sun.jdi.ReferenceType; 50 import com.sun.jdi.ThreadReference; 51 import com.sun.jdi.VMMismatchException; 52 import com.sun.jdi.request.AccessWatchpointRequest; 53 import com.sun.jdi.request.BreakpointRequest; 54 import com.sun.jdi.request.ClassPrepareRequest; 55 import com.sun.jdi.request.ClassUnloadRequest; 56 import com.sun.jdi.request.DuplicateRequestException; 57 import com.sun.jdi.request.EventRequest; 58 import com.sun.jdi.request.EventRequestManager; 59 import com.sun.jdi.request.ExceptionRequest; 60 import com.sun.jdi.request.InvalidRequestStateException; 61 import com.sun.jdi.request.MethodEntryRequest; 62 import com.sun.jdi.request.MethodExitRequest; 63 import com.sun.jdi.request.ModificationWatchpointRequest; 64 import com.sun.jdi.request.MonitorContendedEnterRequest; 65 import com.sun.jdi.request.MonitorContendedEnteredRequest; 66 import com.sun.jdi.request.MonitorWaitRequest; 67 import com.sun.jdi.request.MonitorWaitedRequest; 68 import com.sun.jdi.request.StepRequest; 69 import com.sun.jdi.request.ThreadDeathRequest; 70 import com.sun.jdi.request.ThreadStartRequest; 71 import com.sun.jdi.request.VMDeathRequest; 72 73 79 public class EventRequestManagerImpl extends MirrorImpl implements EventRequestManager, org.eclipse.jdi.hcr.EventRequestManager { 80 81 private static final int ACCESS_WATCHPOINT_INDEX = 0; 82 private static final int BREAKPOINT_INDEX = 1; 83 private static final int CLASS_PREPARE_INDEX = 2; 84 private static final int CLASS_UNLOAD_INDEX = 3; 85 private static final int EXCEPTION_INDEX = 4; 86 private static final int METHOD_ENTRY_INDEX = 5; 87 private static final int METHOD_EXIT_INDEX = 6; 88 private static final int MODIFICATION_WATCHPOINT_INDEX = 7; 89 private static final int STEP_INDEX = 8; 90 private static final int THREAD_DEATH_INDEX = 9; 91 private static final int THREAD_START_INDEX = 10; 92 private static final int VM_DEATH_INDEX = 11; 93 private static final int MONITOR_CONTENDED_ENTERED_INDEX = 12; 94 private static final int MONITOR_CONTENDED_ENTER_INDEX = 13; 95 private static final int MONITOR_WAITED_INDEX = 14; 96 private static final int MONITOR_WAIT_INDEX = 15; 97 98 99 private HashSet [] fRequests; 100 101 102 private Hashtable [] fEnabledRequests; 103 104 107 public EventRequestManagerImpl(VirtualMachineImpl vmImpl) { 108 super("EventRequestManager", vmImpl); 110 fRequests = new HashSet [MONITOR_WAIT_INDEX + 1]; 112 for (int i = 0; i < fRequests.length; i++) 113 fRequests[i] = new HashSet (); 114 115 fEnabledRequests = new Hashtable [MONITOR_WAIT_INDEX + 1]; 117 for (int i = 0; i < fEnabledRequests.length; i++) 118 fEnabledRequests[i] = new Hashtable (); 119 } 120 121 124 public AccessWatchpointRequest createAccessWatchpointRequest(Field field) { 125 FieldImpl fieldImpl = (FieldImpl)field; 126 AccessWatchpointRequestImpl req = new AccessWatchpointRequestImpl(virtualMachineImpl()); 127 req.addFieldFilter(fieldImpl); 128 addEventRequest(ACCESS_WATCHPOINT_INDEX, req); 129 return req; 130 } 131 132 135 public BreakpointRequest createBreakpointRequest(Location location) throws VMMismatchException { 136 LocationImpl locImpl = (LocationImpl)location; 137 BreakpointRequestImpl req = new BreakpointRequestImpl(virtualMachineImpl()); 138 req.addLocationFilter(locImpl); 139 addEventRequest(BREAKPOINT_INDEX, req); 140 return req; 141 } 142 143 146 public ClassPrepareRequest createClassPrepareRequest() { 147 ClassPrepareRequestImpl req = new ClassPrepareRequestImpl(virtualMachineImpl()); 148 addEventRequest(CLASS_PREPARE_INDEX, req); 149 return req; 150 } 151 152 155 public ClassUnloadRequest createClassUnloadRequest() { 156 ClassUnloadRequestImpl req = new ClassUnloadRequestImpl(virtualMachineImpl()); 157 addEventRequest(CLASS_UNLOAD_INDEX, req); 158 return req; 159 } 160 161 164 public ExceptionRequest createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught) { 165 ReferenceTypeImpl refTypeImpl = (ReferenceTypeImpl)refType; 166 ExceptionRequestImpl req = new ExceptionRequestImpl(virtualMachineImpl()); 167 req.addExceptionFilter(refTypeImpl, notifyCaught, notifyUncaught); 168 addEventRequest(EXCEPTION_INDEX, req); 169 return req; 170 } 171 172 175 public MethodEntryRequest createMethodEntryRequest() { 176 MethodEntryRequestImpl req = new MethodEntryRequestImpl(virtualMachineImpl()); 177 addEventRequest(METHOD_ENTRY_INDEX, req); 178 return req; 179 } 180 181 184 public MethodExitRequest createMethodExitRequest() { 185 MethodExitRequestImpl req = new MethodExitRequestImpl(virtualMachineImpl()); 186 addEventRequest(METHOD_EXIT_INDEX, req); 187 return req; 188 } 189 190 194 public MonitorContendedEnteredRequest createMonitorContendedEnteredRequest() { 195 MonitorContendedEnteredRequestImpl req = new MonitorContendedEnteredRequestImpl(virtualMachineImpl()); 196 addEventRequest(MONITOR_CONTENDED_ENTERED_INDEX, req); 197 return req; 198 } 199 200 204 public MonitorContendedEnterRequest createMonitorContendedEnterRequest() { 205 MonitorContendedEnterRequestImpl req = new MonitorContendedEnterRequestImpl(virtualMachineImpl()); 206 addEventRequest(MONITOR_CONTENDED_ENTER_INDEX, req); 207 return req; 208 } 209 210 214 public MonitorWaitedRequest createMonitorWaitedRequest() { 215 MonitorWaitedRequestImpl req = new MonitorWaitedRequestImpl(virtualMachineImpl()); 216 addEventRequest(MONITOR_WAITED_INDEX, req); 217 return req; 218 } 219 220 224 public MonitorWaitRequest createMonitorWaitRequest() { 225 MonitorWaitRequestImpl req = new MonitorWaitRequestImpl(virtualMachineImpl()); 226 addEventRequest(MONITOR_WAIT_INDEX, req); 227 return req; 228 } 229 230 233 public ModificationWatchpointRequest createModificationWatchpointRequest(Field field) { 234 FieldImpl fieldImpl = (FieldImpl)field; 235 ModificationWatchpointRequestImpl req = new ModificationWatchpointRequestImpl(virtualMachineImpl()); 236 req.addFieldFilter(fieldImpl); 237 addEventRequest(MODIFICATION_WATCHPOINT_INDEX, req); 238 return req; 239 } 240 241 244 public StepRequest createStepRequest(ThreadReference thread, int size, int depth) throws DuplicateRequestException, ObjectCollectedException { 245 ThreadReferenceImpl threadImpl = (ThreadReferenceImpl)thread; 246 StepRequestImpl req = new StepRequestImpl(virtualMachineImpl()); 247 req.addStepFilter(threadImpl, size, depth); 248 addEventRequest(STEP_INDEX, req); 249 return req; 250 } 251 252 255 public ThreadDeathRequest createThreadDeathRequest() { 256 ThreadDeathRequestImpl req = new ThreadDeathRequestImpl(virtualMachineImpl()); 257 addEventRequest(THREAD_DEATH_INDEX, req); 258 return req; 259 } 260 261 264 public ThreadStartRequest createThreadStartRequest() { 265 ThreadStartRequestImpl req = new ThreadStartRequestImpl(virtualMachineImpl()); 266 addEventRequest(THREAD_START_INDEX, req); 267 return req; 268 } 269 270 271 274 public VMDeathRequest createVMDeathRequest() { 275 VMDeathRequestImpl req = new VMDeathRequestImpl(virtualMachineImpl()); 276 addEventRequest(VM_DEATH_INDEX, req); 277 return req; 278 } 279 280 283 public org.eclipse.jdi.hcr.ReenterStepRequest createReenterStepRequest(ThreadReference thread) { 284 virtualMachineImpl().checkHCRSupported(); 285 ThreadReferenceImpl threadImpl = (ThreadReferenceImpl)thread; 286 ReenterStepRequestImpl req = new ReenterStepRequestImpl(virtualMachineImpl()); 287 req.addStepFilter(threadImpl, StepRequest.STEP_MIN, 0); 290 addEventRequest(STEP_INDEX, req); 292 return req; 293 } 294 295 301 public void enableInternalClassPrepareEvent() { 302 ClassPrepareRequestImpl requestPrepare = 305 new ClassPrepareRequestImpl(virtualMachineImpl()); 306 requestPrepare.setGeneratedInside(); 307 requestPrepare.setSuspendPolicy(EventRequest.SUSPEND_NONE); 308 309 requestPrepare.enable(); 310 } 311 312 316 public void enableInternalClasUnloadEvent() { 317 ClassUnloadRequestImpl reqUnload = new ClassUnloadRequestImpl(virtualMachineImpl()); 320 reqUnload.setGeneratedInside(); 321 reqUnload.setSuspendPolicy(EventRequest.SUSPEND_NONE); 325 reqUnload.enable(); 326 } 327 328 331 boolean existsEnabledStepRequest(ThreadReferenceImpl threadImpl) { 332 Enumeration enumeration = fEnabledRequests[STEP_INDEX].elements(); 333 StepRequestImpl step; 334 while (enumeration.hasMoreElements()) { 335 step = (StepRequestImpl)enumeration.nextElement(); 336 if (step.thread() == threadImpl) 337 return true; 338 } 339 return false; 340 } 341 342 345 public void deleteAllBreakpoints() { 346 EventRequestImpl.clearAllBreakpoints(this); 347 fRequests[BREAKPOINT_INDEX].clear(); 348 fEnabledRequests[BREAKPOINT_INDEX].clear(); 349 } 350 351 354 public void addEventRequest(int index, EventRequest req) { 355 fRequests[index].add(req); 356 } 357 358 361 private void deleteEventRequest(int index, EventRequest req) throws VMMismatchException { 362 checkVM(req); 364 EventRequestImpl requestImpl = (EventRequestImpl)req; 365 fRequests[index].remove(requestImpl); 366 if (requestImpl.requestID() != null) 367 fEnabledRequests[index].remove(requestImpl.requestID()); 368 } 369 370 373 public void deleteEventRequest(EventRequest req) { 374 try { 376 req.disable(); 377 } catch (InvalidRequestStateException exception) { 378 } 380 381 if (req instanceof AccessWatchpointRequestImpl) 383 deleteEventRequest(ACCESS_WATCHPOINT_INDEX, req); 384 else if (req instanceof BreakpointRequestImpl) 385 deleteEventRequest(BREAKPOINT_INDEX, req); 386 else if (req instanceof ClassPrepareRequestImpl) 387 deleteEventRequest(CLASS_PREPARE_INDEX, req); 388 else if (req instanceof ClassUnloadRequestImpl) 389 deleteEventRequest(CLASS_UNLOAD_INDEX, req); 390 else if (req instanceof ExceptionRequestImpl) 391 deleteEventRequest(EXCEPTION_INDEX, req); 392 else if (req instanceof MethodEntryRequestImpl) 393 deleteEventRequest(METHOD_ENTRY_INDEX, req); 394 else if (req instanceof MethodExitRequestImpl) 395 deleteEventRequest(METHOD_EXIT_INDEX, req); 396 else if (req instanceof ModificationWatchpointRequestImpl) 397 deleteEventRequest(MODIFICATION_WATCHPOINT_INDEX, req); 398 else if (req instanceof StepRequestImpl) 399 deleteEventRequest(STEP_INDEX, req); 400 else if (req instanceof ThreadDeathRequestImpl) 401 deleteEventRequest(THREAD_DEATH_INDEX, req); 402 else if (req instanceof ThreadStartRequestImpl) 403 deleteEventRequest(THREAD_START_INDEX, req); 404 else if(req instanceof MonitorContendedEnterRequestImpl) { 405 deleteEventRequest(MONITOR_CONTENDED_ENTER_INDEX, req); 406 } 407 else if(req instanceof MonitorContendedEnteredRequestImpl) { 408 deleteEventRequest(MONITOR_CONTENDED_ENTERED_INDEX, req); 409 } 410 else if(req instanceof MonitorWaitRequestImpl) { 411 deleteEventRequest(MONITOR_WAIT_INDEX, req); 412 } 413 else if(req instanceof MonitorWaitedRequestImpl) { 414 deleteEventRequest(MONITOR_WAITED_INDEX, req); 415 } 416 else 417 418 throw new InternalError (MessageFormat.format(RequestMessages.EventRequestManagerImpl_EventRequest_type_of__0__is_unknown_1, new String []{req.toString()})); 419 } 420 421 424 public void deleteEventRequests(List requests) throws VMMismatchException { 425 Iterator iter = requests.iterator(); 426 while(iter.hasNext()) { 427 Object obj = iter.next(); 428 deleteEventRequest((EventRequest)obj); 429 } 430 } 431 432 436 public List accessWatchpointRequests() { 437 return new ArrayList (fRequests[ACCESS_WATCHPOINT_INDEX]); 438 } 439 440 444 public List breakpointRequests() { 445 return new ArrayList (fRequests[BREAKPOINT_INDEX]); 446 } 447 448 452 public List classPrepareRequests() { 453 return new ArrayList (fRequests[CLASS_PREPARE_INDEX]); 454 } 455 456 460 public List classUnloadRequests() { 461 return new ArrayList (fRequests[CLASS_UNLOAD_INDEX]); 462 } 463 464 468 public List exceptionRequests() { 469 return new ArrayList (fRequests[EXCEPTION_INDEX]); 470 } 471 472 476 public List methodEntryRequests() { 477 return new ArrayList (fRequests[METHOD_ENTRY_INDEX]); 478 } 479 480 484 public List methodExitRequests() { 485 return new ArrayList (fRequests[METHOD_EXIT_INDEX]); 486 } 487 488 492 public List modificationWatchpointRequests() { 493 return new ArrayList (fRequests[MODIFICATION_WATCHPOINT_INDEX]); 494 } 495 496 500 public List stepRequests() { 501 return new ArrayList (fRequests[STEP_INDEX]); 502 } 503 504 508 public List threadDeathRequests() { 509 return new ArrayList (fRequests[THREAD_DEATH_INDEX]); 510 } 511 512 516 public List threadStartRequests() { 517 return new ArrayList (fRequests[THREAD_START_INDEX]); 518 } 519 520 524 public List vmDeathRequests() { 525 return new ArrayList (fRequests[VM_DEATH_INDEX]); 526 } 527 528 public void removeRequestIDMapping(EventRequestImpl req) { 529 if (req instanceof AccessWatchpointRequestImpl) 530 fEnabledRequests[ACCESS_WATCHPOINT_INDEX].remove(req.requestID()); 531 else if (req instanceof BreakpointRequestImpl) 532 fEnabledRequests[BREAKPOINT_INDEX].remove(req.requestID()); 533 else if (req instanceof ClassPrepareRequestImpl) 534 fEnabledRequests[CLASS_PREPARE_INDEX].remove(req.requestID()); 535 else if (req instanceof ClassUnloadRequestImpl) 536 fEnabledRequests[CLASS_UNLOAD_INDEX].remove(req.requestID()); 537 else if (req instanceof ExceptionRequestImpl) 538 fEnabledRequests[EXCEPTION_INDEX].remove(req.requestID()); 539 else if (req instanceof MethodEntryRequestImpl) 540 fEnabledRequests[METHOD_ENTRY_INDEX].remove(req.requestID()); 541 else if (req instanceof MethodExitRequestImpl) 542 fEnabledRequests[METHOD_EXIT_INDEX].remove(req.requestID()); 543 else if (req instanceof ModificationWatchpointRequestImpl) 544 fEnabledRequests[MODIFICATION_WATCHPOINT_INDEX].remove(req.requestID()); 545 else if (req instanceof StepRequestImpl) 546 fEnabledRequests[STEP_INDEX].remove(req.requestID()); 547 else if (req instanceof ThreadDeathRequestImpl) 548 fEnabledRequests[THREAD_DEATH_INDEX].remove(req.requestID()); 549 else if (req instanceof ThreadStartRequestImpl) 550 fEnabledRequests[THREAD_START_INDEX].remove(req.requestID()); 551 else if(req instanceof MonitorContendedEnterRequestImpl) { 552 fEnabledRequests[MONITOR_CONTENDED_ENTER_INDEX].remove(req.requestID()); 553 } 554 else if(req instanceof MonitorContendedEnteredRequestImpl) { 555 fEnabledRequests[MONITOR_CONTENDED_ENTERED_INDEX].remove(req.requestID()); 556 } 557 else if(req instanceof MonitorWaitRequestImpl) { 558 fEnabledRequests[MONITOR_WAIT_INDEX].remove(req.requestID()); 559 } 560 else if(req instanceof MonitorWaitedRequestImpl) { 561 fEnabledRequests[MONITOR_WAITED_INDEX].remove(req.requestID()); 562 } 563 } 564 565 568 public void addRequestIDMapping(EventRequestImpl req) { 569 if (req instanceof AccessWatchpointRequestImpl) 570 fEnabledRequests[ACCESS_WATCHPOINT_INDEX].put(req.requestID(), req); 571 else if (req instanceof BreakpointRequestImpl) 572 fEnabledRequests[BREAKPOINT_INDEX].put(req.requestID(), req); 573 else if (req instanceof ClassPrepareRequestImpl) 574 fEnabledRequests[CLASS_PREPARE_INDEX].put(req.requestID(), req); 575 else if (req instanceof ClassUnloadRequestImpl) 576 fEnabledRequests[CLASS_UNLOAD_INDEX].put(req.requestID(), req); 577 else if (req instanceof ExceptionRequestImpl) 578 fEnabledRequests[EXCEPTION_INDEX].put(req.requestID(), req); 579 else if (req instanceof MethodEntryRequestImpl) 580 fEnabledRequests[METHOD_ENTRY_INDEX].put(req.requestID(), req); 581 else if (req instanceof MethodExitRequestImpl) 582 fEnabledRequests[METHOD_EXIT_INDEX].put(req.requestID(), req); 583 else if (req instanceof ModificationWatchpointRequestImpl) 584 fEnabledRequests[MODIFICATION_WATCHPOINT_INDEX].put(req.requestID(), req); 585 else if (req instanceof StepRequestImpl) 586 fEnabledRequests[STEP_INDEX].put(req.requestID(), req); 587 else if (req instanceof ThreadDeathRequestImpl) 588 fEnabledRequests[THREAD_DEATH_INDEX].put(req.requestID(), req); 589 else if (req instanceof ThreadStartRequestImpl) 590 fEnabledRequests[THREAD_START_INDEX].put(req.requestID(), req); 591 else if(req instanceof MonitorWaitRequestImpl) { 592 fEnabledRequests[MONITOR_WAIT_INDEX].put(req.requestID(), req); 593 } 594 else if(req instanceof MonitorWaitedRequestImpl) { 595 fEnabledRequests[MONITOR_WAITED_INDEX].put(req.requestID(), req); 596 } 597 else if(req instanceof MonitorContendedEnterRequestImpl) { 598 fEnabledRequests[MONITOR_CONTENDED_ENTER_INDEX].put(req.requestID(), req); 599 } 600 else if(req instanceof MonitorContendedEnteredRequestImpl) { 601 fEnabledRequests[MONITOR_CONTENDED_ENTERED_INDEX].put(req.requestID(), req); 602 } 603 } 604 605 608 public EventRequestImpl findRequest(EventImpl event) { 609 if (event instanceof AccessWatchpointEventImpl) 610 return (EventRequestImpl)fEnabledRequests[ACCESS_WATCHPOINT_INDEX].get(event.requestID()); 611 else if (event instanceof BreakpointEventImpl) 612 return (EventRequestImpl)fEnabledRequests[BREAKPOINT_INDEX].get(event.requestID()); 613 else if (event instanceof ClassPrepareEventImpl) 614 return (ClassPrepareRequestImpl)fEnabledRequests[CLASS_PREPARE_INDEX].get(event.requestID()); 615 else if (event instanceof ClassUnloadEventImpl) 616 return (EventRequestImpl)fEnabledRequests[CLASS_UNLOAD_INDEX].get(event.requestID()); 617 else if (event instanceof ExceptionEventImpl) 618 return (EventRequestImpl)fEnabledRequests[EXCEPTION_INDEX].get(event.requestID()); 619 else if (event instanceof MethodEntryEventImpl) 620 return (EventRequestImpl)fEnabledRequests[METHOD_ENTRY_INDEX].get(event.requestID()); 621 else if (event instanceof MethodExitEventImpl) 622 return (EventRequestImpl)fEnabledRequests[METHOD_EXIT_INDEX].get(event.requestID()); 623 else if (event instanceof ModificationWatchpointEventImpl) 624 return (EventRequestImpl)fEnabledRequests[MODIFICATION_WATCHPOINT_INDEX].get(event.requestID()); 625 else if (event instanceof StepEventImpl) 626 return (EventRequestImpl)fEnabledRequests[STEP_INDEX].get(event.requestID()); 627 else if (event instanceof ThreadDeathEventImpl) 628 return (EventRequestImpl)fEnabledRequests[THREAD_DEATH_INDEX].get(event.requestID()); 629 else if (event instanceof ThreadStartEventImpl) 630 return (EventRequestImpl)fEnabledRequests[THREAD_START_INDEX].get(event.requestID()); 631 else if (event instanceof VMDeathEventImpl) 632 return (EventRequestImpl)fEnabledRequests[VM_DEATH_INDEX].get(event.requestID()); 633 else if(event instanceof MonitorWaitEventImpl) { 634 return (EventRequestImpl)fEnabledRequests[MONITOR_WAIT_INDEX].get(event.requestID()); 635 } 636 else if(event instanceof MonitorWaitedEventImpl) { 637 return (EventRequestImpl)fEnabledRequests[MONITOR_WAITED_INDEX].get(event.requestID()); 638 } 639 else if(event instanceof MonitorContendedEnterEventImpl) { 640 return (EventRequestImpl)fEnabledRequests[MONITOR_CONTENDED_ENTER_INDEX].get(event.requestID()); 641 } 642 else if(event instanceof MonitorContendedEnteredEventImpl) { 643 return (EventRequestImpl)fEnabledRequests[MONITOR_CONTENDED_ENTERED_INDEX].get(event.requestID()); 644 } 645 else 646 throw new InternalError (RequestMessages.EventRequestManagerImpl_Got_event_of_unknown_type_2); 647 } 648 649 653 public List monitorContendedEnterRequests() { 654 return new ArrayList (fRequests[MONITOR_CONTENDED_ENTER_INDEX]); 655 } 656 657 661 public List monitorContendedEnteredRequests() { 662 return new ArrayList (fRequests[MONITOR_CONTENDED_ENTERED_INDEX]); 663 } 664 665 669 public List monitorWaitRequests() { 670 return new ArrayList (fRequests[MONITOR_WAIT_INDEX]); 671 } 672 673 677 public List monitorWaitedRequests() { 678 return new ArrayList (fRequests[MONITOR_WAITED_INDEX]); 679 } 680 } 681 | Popular Tags |