Fires a frame received event ({@link KNXListener#frameReceived(FrameEvent)}) for
the supplied cEMI <code>frame</code>.

@param frame the cEMI to generate the event for
770900
protected void fireFrameReceived(CEMI frame)
	{
		final FrameEvent fe = new FrameEvent(this, frame);
		for (final Iterator i = listenersCopy.iterator(); i.hasNext();) {
			final KNXListener l = (KNXListener) i.next();
			try {
				l.frameReceived(fe);
			}
			catch (final RuntimeException e) {
				removeConnectionListener(l);
				logger.error("removed event listener", e);
			}
		}
	}
1168181
void onReadingThreadFinished(WebSocketFrame closeFrame)
    {
        synchronized (mThreadsLock)
        {
            mReadingThreadFinished = true;
            mServerCloseFrame = closeFrame;

            if (mWritingThreadFinished == false)
            {
                // Wait for the writing thread to finish.
                return;
            }
        }

        // Both the reading thread and the writing thread have finished.
        onThreadsFinished();
    }
782994
void process(ByteChannel sock, AutoBuffer ab) throws IOException {
        int requestType = ab.get1();
        switch (requestType) {
            case CREATE_FRAME:
                ExternalFrameWriterBackend.handleWriteToChunk(sock, ab);
                break;
            case DOWNLOAD_FRAME:
                ExternalFrameReaderBackend.handleReadingFromChunk(sock, ab);
                break;
        }
    }
468734
protected function sendFrame($frame)
    {
        $c = &$this->attrs->get['c'];
        if (!is_string($c)) {
            $this->header('400 Bad Request');
            $this->finish();
            return;
        }
        $this->outputFrame($c . '(' . json_encode($frame, JSON_UNESCAPED_SLASHES) . ");\r\n");
        parent::sendFrame($frame);
    }
630370
public void send(CEMI frame, BlockingMode mode) throws KNXTimeoutException,
		KNXConnectionClosedException
	{
		if (!(frame instanceof CEMIDevMgmt))
			throw new KNXIllegalArgumentException("unsupported cEMI type");
		super.send(frame, mode);
	}
135506
protected synchronized void fireMPDChangeEvent(MPDChangeEvent.Event event) {
        MPDChangeEvent mce = new MPDChangeEvent(this, event);

        for (MPDChangeListener mcl : listeners) {
            mcl.mpdChanged(mce);
        }
    }
515600
def process_frames(self):
        '''
        
        '''
        while len(self._frame_buffer):
            # It would make sense to call next_frame, but it's
            # technically faster to repeat the code here.
            frame = self._frame_buffer.popleft()

            if self._emergency_close_pending:
                # Implement stability rule from AMQP 0.9.1 section 1.5.2.5.
                # Method channel.close: "After sending this method, any
                # received methods except Close and Close-OK MUST be discarded."
                #
                # NOTE: presently, we limit our implementation of the rule to
                # the "emergency close" scenario to avoid potential adverse
                # side-effect during normal user-initiated close
                if (not isinstance(frame, MethodFrame) or
                      frame.class_id != self.channel.CLASS_ID or
                      frame.method_id not in (self.channel.CLOSE_METHOD_ID,
                                              self.channel.CLOSE_OK_METHOD_ID)):
                    self.logger.warn("Emergency channel close: dropping input "
                                     "frame %.255s", frame)
                    continue
            try:
                self.dispatch(frame)
            except ProtocolClass.FrameUnderflow:
                return
            except (ConnectionClosed, ChannelClosed):
                # Immediately raise if connection or channel is closed
                raise
            except Exception:
                self.logger.exception(
                    "Closing on failed dispatch of frame %.255s", frame)

                # Spec says that channel should be closed if there's a framing
                # error. Unsure if we can send close if the current exception
                # is transport level (e.g. gevent.GreenletExit)
                self._emergency_close_pending = True

                # Preserve the original exception and traceback during cleanup,
                # only allowing system-exiting exceptions (e.g., SystemExit,
                # KeyboardInterrupt) to override it
                try:
                    raise
                finally:
                    try:
                        self.close(500, "Failed to dispatch %s" % (str(frame)))
                    except Exception:
                        # Suppress secondary non-system-exiting exception in
                        # favor of the original exception
                        self.logger.exception("Channel close failed")
                        pass
534619
@Deprecated
    public EventBuilder withCulprit(StackTraceElement frame) {
        return withCulprit(buildCulpritString(frame.getClassName(), frame.getMethodName(),
            frame.getFileName(), frame.getLineNumber()));
    }
913978
public void fireGeneralEvent(GeneralEvent e)
    {
        Object[] listeners = listenerList.getListenerList();

        // notify those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2)
        {
            if (listeners[i] == GeneralEventListener.class)
            {
                ((GeneralEventListener) listeners[i + 1]).generalEventUpdate(e);
            }
        }

    }
385202
public void setFrame(final int frame) {
    if (composition == null) {
      lazyCompositionTasks.add(new LazyCompositionTask() {
        @Override
        public void run(LottieComposition composition) {
          setFrame(frame);
        }
      });
      return;
    }

    animator.setFrame(frame);
  }
299725
def send_frame(self, frame):
        

        self._sendbuf += self._send_streamify(frame)
        self._sendbuf_event.set()
1250751
protected final void fireServiceAdded(BeanContextServiceAvailableEvent event)
	{
		Object listeners[];
		synchronized (bcsListeners)
		{
			listeners = bcsListeners.toArray();
		}
		for (int i = 0; i < listeners.length; i++)
		{
			BeanContextServicesListener l = (BeanContextServicesListener) listeners[i];
			l.serviceAvailable(event);
		}
	}
808751
synchronized void fireEvent(final Event<?> event) {
        final String eventType = event.getType();
        List<Event<?>> events = synchronizedEvents.get(eventType);
        if (null == events) {
            events = new ArrayList<>();
            synchronizedEvents.put(eventType, events);
        }

        events.add(event);
        setChanged();
        notifyListeners(event);
    }
123077
private void fireMembershipEvent(BeanContextMembershipEvent bcme, boolean childrenAdded) {

        for (BeanContextMembershipListener bcml : _bcMembershipListeners) {
            if (childrenAdded) {
                bcml.childrenAdded(bcme);
            }
            else {
                bcml.childrenRemoved(bcme);
            }
        }
    }
1280091
def receive(frame)
      transition(frame, false)

      case frame[:type]
      when :data
        update_local_window(frame)
        # Emit DATA frame
        emit(:data, frame[:payload]) unless frame[:ignore]
        calculate_window_update(@local_window_max_size)
      when :headers
        emit(:headers, frame[:payload]) unless frame[:ignore]
      when :push_promise
        emit(:promise_headers, frame[:payload]) unless frame[:ignore]
      when :priority
        process_priority(frame)
      when :window_update
        process_window_update(frame)
      when :altsvc
        # 4.  The ALTSVC HTTP/2 Frame
        # An ALTSVC frame on a
        # stream other than stream 0 containing non-empty "Origin" information
        # is invalid and MUST be ignored.
        if !frame[:origin] || frame[:origin].empty?
          emit(frame[:type], frame)
        end
      when :blocked
        emit(frame[:type], frame)
      end

      complete_transition(frame)
    end
168585
public void processCompleteFrame() throws Http2Exception {
        Frame currentFrame = getCurrentFrame();

        boolean frameSizeError = false;
        try {
            currentFrame.processPayload(this);
        } catch (Http2Exception e) {
            // If we get an error here, it should be safe to assume that this frame doesn't have the expected byte count,
            // which must be treated as an error of type FRAME_SIZE_ERROR.  If we're processing a DATA or PRIORITY frame, then
            // we can treat the error as a stream error rather than a connection error.
            if (!e.isConnectionError()) {
                frameSizeError = true;
            } else {
                // this is a connection error; we need to send a GOAWAY on the connection
                throw e;
            }
        } catch (Exception e) {
            throw new ProtocolException("Error processing the payload for " + currentFrame.getFrameType()
                                        + " frame on stream " + currentFrame.getStreamId());
        }

        // call the stream processor to process this stream. For now, don't return from here until the
        // frame has been fully processed.
        int streamId = currentFrame.getStreamId();
        H2StreamProcessor stream = muxLink.getStream(streamId);

        if (stream == null) {
            if ((streamId != 0) && (streamId % 2 == 0)) {
                if (currentFrame.getFrameType().equals(FrameTypes.PRIORITY)) {
                    // ignore PRIORITY frames in any state
                    return;
                } else if (currentFrame.getFrameType().equals(FrameTypes.RST_STREAM) && streamId < muxLink.getHighestClientStreamId()) {
                    // tolerate RST_STREAM frames that are sent on closed push streams
                    return;
                } else {
                    throw new ProtocolException("Cannot start a stream from the client with an even numbered ID. stream-id: " + streamId);
                }
            } else {
                stream = startNewInboundSession(streamId);
            }
        }
        if (frameSizeError) {
            currentFrame = new FrameRstStream(streamId, 4, (byte) 0, false, FrameDirection.READ);
            ((FrameRstStream) currentFrame).setErrorCode(Constants.FRAME_SIZE_ERROR);
        }

        stream.processNextFrame(currentFrame, Direction.READ_IN);
    }
147248
def frame_received_cb(self, frame):
        """"""
        PYVLXLOG.debug("REC: %s", frame)
        for frame_received_cb in self.frame_received_cbs:
            # pylint: disable=not-callable
            self.loop.create_task(frame_received_cb(frame))