Declare the exchange

        When completed, the on_exchange_declareok method will be invoked by pika.
335058
def setup_exchange(self):
        
        logger.debug('Declaring exchange %s', self._exchange)
        self._channel.exchange_declare(self.on_exchange_declareok,
                                       self._exchange,
                                       self._exchange_type,
                                       durable=True)
639239
def register(self, entry_point):
        
        if entry_point in self.registered_converters:
            raise ValueError('Already registered')
        self.registered_converters.insert(0, entry_point)
852107
protected function processToken(): void
    {
        // "Sniff" the var name only once, but register the possible error everytime the var is declared.
        if (!$this->sniffedVars[$var = $this->token['content']]) {
            $this->file->recordMetric($this->stackPos, 'CamelCase var name', 'no');

            if (!$this->isSniffSuppressed(static::CODE_NOT_CAMEL_CASE)) {
                $this->file->addError(
                    self::MESSAGE_NOT_CAMEL_CASE,
                    $this->stackPos,
                    static::CODE_NOT_CAMEL_CASE,
                    [
                        $var
                    ]
                );
            }
        } else {
            $this->file->recordMetric($this->stackPos, 'CamelCase var name', 'yes');
        }
    }
494956
void processCommand(final HttpServerExchange exchange, final RequestData requestData, final MCMPAction action) throws IOException {
        if (exchange.getRequestPath().equals("*") || exchange.getRequestPath().endsWith("/*")) {
            processNodeCommand(exchange, requestData, action);
        } else {
            processAppCommand(exchange, requestData, action);
        }
    }
971512
def _on_qosok(self, qosok_frame):
        
        for name, args in self._exchanges.items():
            self._channel.exchange_declare(
                exchange=name,
                exchange_type=args["type"],
                durable=args["durable"],
                auto_delete=args["auto_delete"],
                arguments=args["arguments"],
                passive=config.conf["passive_declares"],
                callback=self._on_exchange_declareok,
            )
        for name, args in self._queues.items():
            self._channel.queue_declare(
                queue=name,
                durable=args["durable"],
                auto_delete=args["auto_delete"],
                exclusive=args["exclusive"],
                arguments=args["arguments"],
                passive=config.conf["passive_declares"],
                callback=self._on_queue_declareok,
            )
827013
def on_call(receiver, dot, method)
      if rcv = resolve_receiver(receiver)
        method_call(method, [rcv])
      end
       
      keep_walking(receiver)
    end
392875
protected void handleRedirectResponse(HttpServerExchange exchange, Response response) {
        exchange.setStatusCode(StatusCodes.FOUND);
        
        Server.headers()
            .entrySet()
            .stream()
            .filter(entry -> StringUtils.isNotBlank(entry.getValue()))
            .forEach(entry -> exchange.getResponseHeaders().add(entry.getKey().toHttpString(), entry.getValue()));

        exchange.getResponseHeaders().put(Header.LOCATION.toHttpString(), response.getRedirectTo());
        response.getHeaders().forEach((key, value) -> exchange.getResponseHeaders().add(key, value));
        exchange.endExchange();
    }
638960
protected void doEmit(Event event, Scope<? super Address> scope) {
		assert scope != null;
		assert event != null;
		final UniqueAddressParticipantRepository<Address> particips = getParticipantInternalDataStructure();
		final SynchronizedCollection<EventListener> listeners = particips.getListeners();
		synchronized (listeners.mutex()) {
			for (final EventListener listener : listeners) {
				final Address adr = getAddress(listener);
				if (scope.matches(adr)) {
					this.executorService.submit(new AsyncRunner(listener, event));
				}
			}
		}
	}
350039
def declare_consuming(self, exchange_name, routing_key, queue_name, callback):
        
        self.bind_topic_exchange(exchange_name, routing_key, queue_name)
        self.declare_basic_consuming(
            queue_name=queue_name,
            callback=callback
        )
153870
def on_connect(self, client, userdata, flags, result_code):
        
        self.log_info("Connected with result code {}".format(result_code))
        self.state_handler.set_state(State.welcome)
748149
async def exchange_declare(self):
        
        await self.channel.exchange_declare(
            self.exchange,
            self.exchange_type,
            durable=self.durable,
            auto_delete=self.auto_delete,
            no_wait=self.no_wait,
        )
649920
private void performPostCompilationTasksInternal() {
    if (options.devMode == DevMode.START_AND_END) {
      runValidityCheck();
    }
    setProgress(1.0, "recordFunctionInformation");

    if (tracker != null) {
      tracker.outputTracerReport();
    }
  }
1182376
public function onFinish()
    {
        if ($this->eofTerminated) {
            $this->requestFinished();
            $this->onResponse->executeAll($this, false);
            parent::onFinish();
            return;
        }
        if ($this->protocolError) {
            $this->onResponse->executeAll($this, false);
        } else {
            if (($this->state !== self::STATE_ROOT) && !$this->onResponse->isEmpty()) {
                $this->requestFinished();
            }
        }
        parent::onFinish();
    }
518340
function(curr) {
            if (curr.state === STATE_FULFILLED) execute_handlers(curr, "onFulfilled", curr.fulfillValue); else if (curr.state === STATE_REJECTED) execute_handlers(curr, "onRejected", curr.rejectReason);
        }
895427
def declare(self, context=None):
        
        try:
            sql, uses_external = declare(self.full_table_name, self.definition, context)
            if uses_external:
                sql = sql.format(external_table=self.external_table.full_table_name)
            self.connection.query(sql)
        except pymysql.OperationalError as error:
            # skip if no create privilege
            if error.args[0] == server_error_codes['command denied']:
                logger.warning(error.args[1])
            else:
                raise
        else:
            self._log('Declared ' + self.full_table_name)
622605
public void process(final Exchange exchange) throws Exception {
        final Message in = exchange.getIn();
        final String eventURIBase = in.getHeader(AuditHeaders.EVENT_BASE_URI, String.class);
        final String eventID = in.getHeader(FCREPO_EVENT_ID, String.class);
        final Resource eventURI = createResource(eventURIBase + "/" + eventID);

        // generate SPARQL Update
        final StringBuilder query = new StringBuilder("update=");
        query.append(ProcessorUtils.insertData(serializedGraphForMessage(in, eventURI), ""));

        // update exchange
        in.setBody(query.toString());
        in.setHeader(AuditHeaders.EVENT_URI, eventURI.toString());
        in.setHeader(Exchange.CONTENT_TYPE, "application/x-www-form-urlencoded");
        in.setHeader(Exchange.HTTP_METHOD, "POST");
    }
409903
private void completeExtensionInitiations(TransactionBroadcaster transactionBroadcaster) {
        StoredPaymentChannelClientStates clientStoredChannels = (StoredPaymentChannelClientStates)
                vWallet.getExtensions().get(StoredPaymentChannelClientStates.class.getName());
        if(clientStoredChannels != null) {
            clientStoredChannels.setTransactionBroadcaster(transactionBroadcaster);
        }
        StoredPaymentChannelServerStates serverStoredChannels = (StoredPaymentChannelServerStates)
                vWallet.getExtensions().get(StoredPaymentChannelServerStates.class.getName());
        if(serverStoredChannels != null) {
            serverStoredChannels.setTransactionBroadcaster(transactionBroadcaster);
        }
    }