Dispatch to the different methods responsible for the different stanza
        types or handle a non-stanza stream-level element from `stanza_obj`,
        which has arrived over the given `xmlstream`.
760935
def _process_incoming(self, xmlstream, queue_entry):
        

        stanza_obj, exc = queue_entry

        # first, handle SM stream objects
        if isinstance(stanza_obj, nonza.SMAcknowledgement):
            self._logger.debug("received SM ack: %r", stanza_obj)
            if not self._sm_enabled:
                self._logger.warning("received SM ack, but SM not enabled")
                return
            self.sm_ack(stanza_obj.counter)
            return
        elif isinstance(stanza_obj, nonza.SMRequest):
            self._logger.debug("received SM request: %r", stanza_obj)
            if not self._sm_enabled:
                self._logger.warning("received SM request, but SM not enabled")
                return
            response = nonza.SMAcknowledgement()
            response.counter = self._sm_inbound_ctr
            self._logger.debug("sending SM ack: %r", response)
            xmlstream.send_xso(response)
            return

        # raise if it is not a stanza
        if not isinstance(stanza_obj, stanza.StanzaBase):
            raise RuntimeError(
                "unexpected stanza class: {}".format(stanza_obj))

        # now handle stanzas, these always increment the SM counter
        if self._sm_enabled:
            self._sm_inbound_ctr += 1
            self._sm_inbound_ctr &= 0xffffffff

        # check if the stanza has errors
        if exc is not None:
            self._process_incoming_erroneous_stanza(stanza_obj, exc)
            return

        if isinstance(stanza_obj, stanza.IQ):
            self._process_incoming_iq(stanza_obj)
        elif isinstance(stanza_obj, stanza.Message):
            self._process_incoming_message(stanza_obj)
        elif isinstance(stanza_obj, stanza.Presence):
            self._process_incoming_presence(stanza_obj)
1203058
def dispatch(self, receiver):
        ''' 

        '''
        super(ModelChangedEvent, self).dispatch(receiver)
        if hasattr(receiver, '_document_model_changed'):
            receiver._document_model_changed(self)
1044081
function() {
    var self = this;

    self.jabber.on('data', function(buffer) {
      console.log('  IN > ' + buffer.toString());
    });

    var origSend = this.jabber.send;
    self.jabber.send = function(stanza) {
      console.log(' OUT > ' + stanza);
      return origSend.call(self.jabber, stanza);
    };
  }
173644
public static void handleDomainOperationResponseStreams(final OperationContext context,
                                                            final ModelNode responseNode,
                                                            final List<OperationResponse.StreamEntry> streams) {

        if (responseNode.hasDefined(RESPONSE_HEADERS)) {
            ModelNode responseHeaders = responseNode.get(RESPONSE_HEADERS);
            // Strip out any stream header as the header created by this process is what counts
            responseHeaders.remove(ATTACHED_STREAMS);
            if (responseHeaders.asInt() == 0) {
                responseNode.remove(RESPONSE_HEADERS);
            }
        }

        for (OperationResponse.StreamEntry streamEntry : streams) {
            context.attachResultStream(streamEntry.getUUID(), streamEntry.getMimeType(), streamEntry.getStream());
        }
    }
122591
function StanzaError(message, type, condition) {
  Error.apply(this, arguments);
  Error.captureStackTrace(this, arguments.callee);
  this.name = 'StanzaError';
  this.message = message || null;
  this.type = type || 'wait';
  this.condition = condition || 'internal-server-error';
}
649466
private <T> void manageSubscription(EventStream<T> stream, Consumer<T> consumer) {
        manageSubscription(stream.subscribe(consumer));
    }
1119105
public void dispatchAsComment(org.xml.sax.ext.LexicalHandler lh)
          throws org.xml.sax.SAXException
  {
    fsb().sendSAXComment(lh, m_start, m_length);
  }
970480
def handle_xmlrpc(self, request_text):
        """"""

        response = self._marshaled_dispatch(request_text)

        sys.stdout.write('Content-Type: text/xml\n')
        sys.stdout.write('Content-Length: %d\n' % len(response))
        sys.stdout.write('\n')

        sys.stdout.write(response)
1282983
protected void appendErrorIfExists(XmlStringBuilder xml, XmlEnvironment enclosingXmlEnvironment) {
        StanzaError error = getError();
        if (error != null) {
            xml.append(error.toXML(enclosingXmlEnvironment));
        }
    }
414795
<L, E extends Input.Impl> void dispatch(
      AbstractLayer layer, Class<L> listenerType, E event, Interaction<L, E> interaction) {
    dispatch(layer, listenerType, event, interaction, null);
  }
573160
@Override
    public void marshal(
                    final Object obj,
                    final Result result
                    )
    {
        if (_transformer == null) {
            super.marshal( obj, result );
        } else {
            String  xml = _simpleMarshalToString( obj );
            Source  source = new StreamSource( new StringReader( xml ) );
            _transformer.transform( source, result );
        }
    }
1300529
public void dispatchAsComment(org.xml.sax.ext.LexicalHandler lh)
    throws org.xml.sax.SAXException
  {
  }
1242116
protected void applyStreaming(ContainerRequestContext requestContext, WriterInterceptorContext context)
            throws IOException {

        Object entity = context.getEntity();
        StreamingProcess<Object> process = MessageHelper.getStreamingProcess(context.getEntity(), manager);

        if (process != null) {
            ContainerResponseContext responseContext =
                    (ContainerResponseContext) requestContext.getProperty(RESP_PROP_N);
            responseContext.setStatusInfo(Response.Status.PARTIAL_CONTENT);
            context.getHeaders().putSingle(ACCEPT_RANGES, BYTES_RANGE);
            context.setType(StreamingOutput.class);
            context.setEntity(new MediaStreaming(
                            entity,
                    requestContext.getHeaderString(MediaStreaming.RANGE),
                            process,
                            context.getMediaType(),
                            context.getHeaders()
                    )
            );
        }
    }
391217
def _handle_typename(self, node, scope, ctxt, stream):
        
        self._dlog("handling typename")

        return self._handle_node(node.type, scope, ctxt, stream)
661504
private void dispatchEvent(XoaEvent event) {
        LOG.entering(CLASS_NAME, "dispatchEvent", event);
        
        try {
            Integer handlerId = event.getHandlerId();
            
            XoaEventKind eventKind = event.getEvent();
            if (LOG.isLoggable(Level.FINEST)) {
                LOG.finest("XOA --> SOA: " + handlerId  + " event: " + eventKind.name());
            }
            
            BridgeDelegate handler = xoaObjectMap.get(handlerId);
            if (handler == null) {
                if (LOG.isLoggable(Level.FINEST)) {
                    LOG.finest("No handler for handler id: " + handlerId);
                }
                return;
            }
            
            /* Allow only one bridge crossing per handler at a time */
            synchronized (handler) {
                // dispatch to SOA
                Object[] args = { handlerId, eventKind.toString(), event.getParams() };
                firePropertyChange(XOP_MESSAGE, null, args);
            }

        } catch (Exception e) {
            LOG.log(Level.FINE, "While dispatching event: "+e.getMessage(), e);
            throw new IllegalStateException("Unable to dispatch an event from the cross origin proxy", e);
        }

    }
352316
def _process_incoming_presence(self, stanza_obj):
        
        self._logger.debug("incoming presence: %r", stanza_obj)

        stanza_obj = self.service_inbound_presence_filter.filter(stanza_obj)
        if stanza_obj is None:
            self._logger.debug("incoming presence dropped by service filter"
                               " chain")
            return

        stanza_obj = self.app_inbound_presence_filter.filter(stanza_obj)
        if stanza_obj is None:
            self._logger.debug("incoming presence dropped by application "
                               "filter chain")
            return

        self.on_presence_received(stanza_obj)
1172036
<L, E extends Input.Impl> void dispatch(
      Class<L> listenerType, E event, Interaction<L, E> interaction, Interaction<L, E> onCancel) {
    dispatch(event.captureState.layer, listenerType, event, interaction, onCancel);
  }