Package com.sun.jdi.request

Examples of com.sun.jdi.request.ClassPrepareRequest


        protected void createRequest() {
            EventRequestManager manager = getEventRequestManager();
            if ( manager != null ) {
                try {
                    ClassPrepareRequest req = manager.createClassPrepareRequest();
                    req.addClassFilter( "org.drools.core.base.mvel.MVELDebugHandler" );
                    req.setSuspendPolicy( EventRequest.SUSPEND_ALL );
                    addJDIEventListener( MVELTraceHandler.this,
                                         req );
                    req.enable();

                } catch ( RuntimeException e ) {
                    logError( e );
                }
            }
View Full Code Here


                    //super.breakpointAdded(breakpoint);

                    Iterator<ReferenceType> handleriter = getVM().classesByName( "org.drools.core.base.mvel.MVELDebugHandler" ).iterator();
                    if ( !handleriter.hasNext() ) {
                        // Create class prepare request to add breakpoint after MVELDebugHanlder is loaded
                        ClassPrepareRequest req = getEventRequestManager().createClassPrepareRequest();
                        req.addClassFilter( "org.drools.core.base.mvel.MVELDebugHandler" );
                        req.setSuspendPolicy( EventRequest.SUSPEND_ALL );

                        addJDIEventListener(new IJDIEventListener() {
                            public boolean handleEvent(Event event,    JDIDebugTarget target) {
                                addRemoteBreakpoint(d);
                                return true;
                            }

                            public void wonSuspendVote(Event event, JDIDebugTarget target) {
                            }

                            public void eventSetComplete(Event event, JDIDebugTarget target, boolean suspend, EventSet eventSet) {
                                wonSuspendVote(event, target);
                            }

                            public boolean handleEvent(Event event,    JDIDebugTarget target, boolean suspendVote, EventSet eventSet) {
                                return handleEvent(event, target);
                            }

                        }, req);

                        req.enable();
                        return;
                    }

                    addRemoteBreakpoint( d );
                } else {
View Full Code Here

    Process process = startSecondJVM(VMLocalTarget.class);
    sleep(90);
    // connect
    VirtualMachine vm = new VMAcquirer().connect(debugPort);

    ClassPrepareRequest createClassPrepareRequest = vm
        .eventRequestManager().createClassPrepareRequest();
    createClassPrepareRequest.addClassFilter(VMLocalTarget.class.getName());
    createClassPrepareRequest.enable();
   
    vm.resume();

    List<ThreadReference> allThreads = vm.allThreads();
    for (ThreadReference threadReference : allThreads) {
View Full Code Here

                } else {
                  logger.warning("Error, breakpoint " + bp + " method not found.");
                }
              } else {
                // add a class load breakpoint
                ClassPrepareRequest cpr = vm.eventRequestManager().createClassPrepareRequest();
                cpr.addClassFilter(bp.getClassName());
                cpr.setEnabled(true);
              }
            }
           
            DebugTab.this.eventHandler.setSuspendOnStartup(suspend);
           
View Full Code Here

        } else {
          logger.warning("Error, live breakpoint " + breakpoint + " method not found.");
        }
      } else {
        // add a class load breakpoint
        ClassPrepareRequest cpr = vm.eventRequestManager().createClassPrepareRequest();
        cpr.addClassFilter(breakpoint.getClassName());
        cpr.setEnabled(true);
      }
    }
  }
View Full Code Here

    cpr.addClassFilter("");
    cpr.enable();*/
   
    for(String clazz : traceFilter.getClasses())
      {
      ClassPrepareRequest cpr = mgr.createClassPrepareRequest();
      cpr.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
      cpr.addClassFilter(clazz);
      cpr.enable();
     
      EventRequest req= mgr.createClassUnloadRequest();
      req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
      ((ClassUnloadRequest)req).addClassFilter(clazz);
      req.setEnabled(true);
View Full Code Here

    {
    EventRequestManager mgr = vm.eventRequestManager();
   
    for(String clazz : traceFilter.getClasses())
      {
      ClassPrepareRequest cpr = mgr.createClassPrepareRequest();
      cpr.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
      cpr.addClassFilter(clazz);
      cpr.enable();
      }
   
    if(traceFilter.isTraceThreads())
      {
      //inspeccions creacion hilos
View Full Code Here

      if (bp.getInnerClass() !=null) {
        className = bp.getInnerClass();
      }
      if (names.contains(className)) continue;
      names.add(className);
      ClassPrepareRequest classPrepareRequest = erm.createClassPrepareRequest();
      classPrepareRequest.addClassFilter(className);
      classPrepareRequest.addCountFilter(1);
      classPrepareRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
      classPrepareRequest.enable();
    }

  }
View Full Code Here

        }
    }

    @Override
    public ClassPrepareRequest createPrepareRequest() {
        ClassPrepareRequest request =
            Env.vm().eventRequestManager().createClassPrepareRequest();
        request.addClassFilter(classId);
        request.addCountFilter(1);
        return request;
    }
View Full Code Here

                    //super.breakpointAdded(breakpoint);

                    Iterator handleriter = getVM().classesByName( "org.drools.base.mvel.MVELDebugHandler" ).iterator();
                    if ( !handleriter.hasNext() ) {
                        // Create class prepare request to add breakpoint after MVELDebugHanlder is loaded
                        ClassPrepareRequest req = getEventRequestManager().createClassPrepareRequest();
                        req.addClassFilter( "org.drools.base.mvel.MVELDebugHandler" );
                        req.setSuspendPolicy( EventRequest.SUSPEND_ALL );

                        addJDIEventListener(new IJDIEventListener() {
                            public boolean handleEvent(Event event,    JDIDebugTarget target) {
                                addRemoteBreakpoint(d);
                                return true;
                            }

                            public void wonSuspendVote(Event event, JDIDebugTarget target) {
                            }

                            public void eventSetComplete(Event event, JDIDebugTarget target, boolean suspend, EventSet eventSet) {
                                wonSuspendVote(event, target);
                            }

                            public boolean handleEvent(Event event,    JDIDebugTarget target, boolean suspendVote, EventSet eventSet) {
                                return handleEvent(event, target);
                            }

                        }, req);

                        req.enable();
                        return;
                    }

                    addRemoteBreakpoint( d );
                } else {
View Full Code Here

TOP

Related Classes of com.sun.jdi.request.ClassPrepareRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.