Examples of EventRequest


Examples of com.sun.jdi.request.EventRequest

   *            the event whose request should have its hit count expired or
   *            <code>null</code> to only update the breakpoint marker.
   */
  protected void expireHitCount(Event event) {
    Integer requestCount = null;
    EventRequest request = null;
    if (event != null) {
      request = event.request();
      requestCount = (Integer) request.getProperty(HIT_COUNT);
    }
    if (requestCount != null) {
      if (request != null) {
        request.putProperty(EXPIRED, Boolean.TRUE);
      }
      try {
        setAttributes(fgExpiredEnabledAttributes, new Object[] {
            Boolean.TRUE, Boolean.FALSE });
        // make a note that we auto-disabled this breakpoint.
View Full Code Here

Examples of com.sun.jdi.request.EventRequest

    ArrayList<EventRequest> requests = (ArrayList<EventRequest>) getRequests(target).clone();
    // Iterate over a copy of the requests since this list of requests
    // can be changed in other threads which would cause an
    // ConcurrentModificationException
    Iterator<EventRequest> iter = requests.iterator();
    EventRequest req;
    while (iter.hasNext()) {
      req = iter.next();
      try {
        if (target.isAvailable() && !isExpired(req)) { // cannot delete
                                // an expired
View Full Code Here

Examples of com.sun.jdi.request.EventRequest

        boolean failure = false;
        synchronized(eventRequestSpecs) {
            for (EventRequestSpec spec : eventRequestSpecs) {
                if (!spec.isResolved()) {
                    try {
                        EventRequest eventRequest = spec.resolve(event);
                        if (eventRequest != null) {
                            MessageOutput.println("Set deferred", spec.toString());
                        }
                    } catch (Exception e) {
                        MessageOutput.println("Unable to set deferred",
View Full Code Here

Examples of com.sun.jdi.request.EventRequest

    }

    void resolveAll() {
        for (EventRequestSpec spec : eventRequestSpecs) {
            try {
                EventRequest eventRequest = spec.resolveEagerly();
                if (eventRequest != null) {
                    MessageOutput.println("Set deferred", spec.toString());
                }
            } catch (Exception e) {
            }
View Full Code Here

Examples of com.sun.jdi.request.EventRequest

    }

    boolean addEagerlyResolve(EventRequestSpec spec) {
        try {
            eventRequestSpecs.add(spec);
            EventRequest eventRequest = spec.resolveEagerly();
            if (eventRequest != null) {
                MessageOutput.println("Set", spec.toString());
            }
            return true;
        } catch (Exception exc) {
View Full Code Here

Examples of com.sun.jdi.request.EventRequest

    @Override
    EventRequest resolveEventRequest(ReferenceType refType)
                                      throws NoSuchFieldException {
        Field field = refType.fieldByName(fieldId);
        EventRequestManager em = refType.virtualMachine().eventRequestManager();
        EventRequest wp = em.createModificationWatchpointRequest(field);
        wp.setSuspendPolicy(suspendPolicy);
        wp.enable();
        return wp;
    }
View Full Code Here

Examples of gnu.classpath.jdwp.event.EventRequest

  {
    Jdwp jdwp = getDefault ();
    if (jdwp != null)
      {
  EventManager em = EventManager.getDefault ();
  EventRequest request = em.getEventRequest (event);
  if (request != null)
    {
      try
        {
    System.out.println ("Jdwp.notify: sending event " + event);
    sendEvent (request, event);
    jdwp._enforceSuspendPolicy (request.getSuspendPolicy ());
        }
      catch (Exception e)
        {
    /* Really not much we can do. For now, just print out
       a warning to the user. */
 
View Full Code Here

Examples of gnu.classpath.jdwp.event.EventRequest

  {
    byte eventKind = bb.get();
    byte suspendPolicy = bb.get();
    int modifiers = bb.getInt();

    EventRequest eventReq = new EventRequest(eventKind, suspendPolicy);
    IEventFilter filter = null;
    ReferenceTypeId refId;
    for (int i = 0; i < modifiers; i++)
      {
        byte modKind = bb.get();
        switch (modKind)
          {
          case JdwpConstants.ModKind.COUNT:
            filter = new CountFilter(bb.getInt());
            break;
          case JdwpConstants.ModKind.CONDITIONAL:
            filter = new ConditionalFilter(idMan.readObjectId(bb));
            break;
          case JdwpConstants.ModKind.THREAD_ONLY:
            filter = new ThreadOnlyFilter((ThreadId) idMan.readObjectId(bb));
            break;
          case JdwpConstants.ModKind.CLASS_ONLY:
            filter = new ClassOnlyFilter(idMan.readReferenceTypeId(bb));
            break;
          case JdwpConstants.ModKind.CLASS_MATCH:
            filter = new ClassMatchFilter(JdwpString.readString(bb));
            break;
          case JdwpConstants.ModKind.CLASS_EXCLUDE:
            filter = new ClassExcludeFilter(JdwpString.readString(bb));
            break;
          case JdwpConstants.ModKind.LOCATION_ONLY:
            filter = new LocationOnlyFilter(new Location(bb));
            break;
          case JdwpConstants.ModKind.EXCEPTION_ONLY:
            long id = bb.getLong();
            if (id == 0)
              refId = null;
            else
              refId = idMan.getReferenceType(id);
            boolean caught = (bb.get() == 0) ? false : true;
            boolean unCaught = (bb.get() == 0) ? false : true;
            filter = new ExceptionOnlyFilter(refId, caught, unCaught);
            break;
          case JdwpConstants.ModKind.FIELD_ONLY:
            refId = idMan.readReferenceTypeId(bb);
            ReferenceTypeId fieldId = idMan.readReferenceTypeId(bb);
            filter = new FieldOnlyFilter(refId, fieldId);
            break;
          case JdwpConstants.ModKind.STEP:
            ThreadId tid = (ThreadId) idMan.readObjectId(bb);
            int size = bb.getInt();
            int depth = bb.getInt();
            filter = new StepFilter(tid, size, depth);
            break;
          case JdwpConstants.ModKind.INSTANCE_ONLY:
            ObjectId oid = idMan.readObjectId(bb);
            filter = new InstanceOnlyFilter(oid);
            break;
          default:
            throw new NotImplementedException("modKind " + modKind
                                              + " is not implemented.");
          }
        eventReq.addFilter(filter);
      }

    EventManager.getDefault().requestEvent(eventReq);
    os.writeInt(eventReq.getId());

  }
View Full Code Here

Examples of javax.portlet.EventRequest

     */
    @Test
    public void testEventPortletRequest() throws NoSuchFieldException, IllegalAccessException {
        ApplicationContext applicationContext = createMock(ApplicationContext.class);
        PortletContext portletContext = createMock(PortletContext.class);
        EventRequest request = createMock(EventRequest.class);
        EventResponse response = createMock(EventResponse.class);

        replay(applicationContext, portletContext, request, response);
        EventPortletRequest req = new EventPortletRequest(applicationContext,
                portletContext, request, response);
View Full Code Here

Examples of javax.portlet.EventRequest

        PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService();
        PortletInvokerService invoker = getContainerServices().getPortletInvokerService();

        PortletRequestContext requestContext = rcService.getPortletEventRequestContext(this, request, response, portletWindow);
        PortletEventResponseContext responseContext = rcService.getPortletEventResponseContext(this, request, response, portletWindow);
        EventRequest portletRequest = envService.createEventRequest(requestContext, responseContext, event);
        EventResponse portletResponse = envService.createEventResponse(responseContext);

        FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.EVENT_PHASE);

        List<Event> events = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.