Beispiel #1
0
 /** Constructor for events. */
 protected EventImpl(JDWP.Event.Composite.Events.EventsCommon evt, int requestID) {
   super(EventSetImpl.this.vm);
   this.eventCmd = evt.eventKind();
   this.requestID = requestID;
   EventRequestManagerImpl ermi = EventSetImpl.this.vm.eventRequestManagerImpl();
   this.request = ermi.request(eventCmd, requestID);
 }
Beispiel #2
0
    EventDestination destination() {
      /*
       * We need to decide if this event is for
       * 1. an internal request
       * 2. a client request that is no longer available, ie
       *    it has been deleted, or disabled and re-enabled
       *    which gives it a new ID.
       * 3. a current client request that is disabled
       * 4. a current enabled client request.
       *
       * We will filter this set into a set
       * that contains only 1s for our internal queue
       * and a set that contains only 4s for our client queue.
       * If we get an EventSet that contains only 2 and 3
       * then we have to resume it if it is not SUSPEND_NONE
       * because no one else will.
       */
      if (requestID == 0) {
        /* An unsolicited event.  These have traditionally
         * been treated as client events.
         */
        return EventDestination.CLIENT_EVENT;
      }

      // Is this an event for a current client request?
      if (request == null) {
        // Nope.  Is it an event for an internal request?
        EventRequestManagerImpl ermi = this.vm.getInternalEventRequestManager();
        if (ermi.request(eventCmd, requestID) != null) {
          // Yep
          return EventDestination.INTERNAL_EVENT;
        }
        return EventDestination.UNKNOWN_EVENT;
      }

      // We found a client request
      if (request.isEnabled()) {
        return EventDestination.CLIENT_EVENT;
      }
      return EventDestination.UNKNOWN_EVENT;
    }