当前位置: 首页>>代码示例>>Java>>正文


Java JsonObject.getBoolean方法代码示例

本文整理汇总了Java中io.vertx.core.json.JsonObject.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java JsonObject.getBoolean方法的具体用法?Java JsonObject.getBoolean怎么用?Java JsonObject.getBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.vertx.core.json.JsonObject的用法示例。


在下文中一共展示了JsonObject.getBoolean方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: step2ResultHandshake

import io.vertx.core.json.JsonObject; //导入方法依赖的package包/类
private void step2ResultHandshake(final HttpResponse<Buffer> postReturn) {
	// Don't proceed in a shutdown scenario
	if (this.shuttingDown || this.shutdownCompleted) {
		this.shutdownCompleted = true;
		return;
	}

	// Handle cookies
	this.captureCookies(postReturn.cookies());

	// Handle the body
	final JsonObject handshakeResult = postReturn.bodyAsJsonArray().getJsonObject(0);
	// Check if it worked
	if (handshakeResult.getBoolean("successful", false)) {
		final String clientIdCandidate = handshakeResult.getString("clientId");
		if (clientIdCandidate == null) {
			this.logger.error("Handshake didn't provide clientId");
		} else {
			this.clientId = clientIdCandidate;
			this.step3ActionAdvice(handshakeResult);
		}
	} else {
		this.logger.error("Handshake was unsuccessful");
	}
}
 
开发者ID:Stwissel,项目名称:vertx-sfdc-platformevents,代码行数:26,代码来源:CometD.java

示例2: step3ResultAdvice

import io.vertx.core.json.JsonObject; //导入方法依赖的package包/类
private void step3ResultAdvice(final HttpResponse<Buffer> postReturn) {
	if (this.shuttingDown || this.shutdownCompleted) {
		this.shutdownCompleted = true;
		return;
	}

	// Handle cookies
	this.captureCookies(postReturn.cookies());
	// Handle body
	final JsonObject advice = postReturn.bodyAsJsonArray().getJsonObject(0);
	if (advice.getBoolean("successful", false)) {
		// TODO Extract the advice, especially timeout
		this.step4ActionSubscribe();
	} else {
		this.logger.error("Advice negotiation failed (Step 3)");
	}
}
 
开发者ID:Stwissel,项目名称:vertx-sfdc-platformevents,代码行数:18,代码来源:CometD.java

示例3: configure

import io.vertx.core.json.JsonObject; //导入方法依赖的package包/类
@Override
public SockJSHandler configure(VertxContext vertxContext, ServerConfiguration<JsonObject, JsonObject[]> config) {

    JsonObject sockJsConfig=config.getJsonObject(CONFIG_KEY, makeDefaultConfig());

    BridgeOptions bridgeOptions = configureBridgeOptions(sockJsConfig);

    SockJSHandler sockJSHandler = configureSockJsHandler(vertxContext, bridgeOptions, sockJsConfig);
    boolean CSRFProteceted=sockJsConfig.getBoolean(CSRF_PROTECTED, false);
    if(CSRFProteceted) {
        if(config.getString(CSRF_SECRET, EMPTY_CSRF_SECRET).isEmpty() || config.getString(CSRF_SECRET,
                EMPTY_CSRF_SECRET).length()<12)
            throw new CsrfProtectionEnabledBuInvalidSecretProvided();
        vertxContext.router().route().path(VertxBusContext.DEFAULT_EVENTBUS_PATH).handler(CookieHandler.create());
        vertxContext.router().route().path(VertxBusContext.DEFAULT_EVENTBUS_PATH).handler(
                CSRFHandler.create(config.getString(CSRF_SECRET, EMPTY_CSRF_SECRET)));
    }
    return sockJSHandler;
}
 
开发者ID:GwtDomino,项目名称:domino-event-bus,代码行数:20,代码来源:VertxConfigSockJsConfigurator.java

示例4: retrieve

import io.vertx.core.json.JsonObject; //导入方法依赖的package包/类
@Override
protected OAuth2Auth retrieve() {
	JsonObject authConfig = record().getMetadata().copy().mergeIn(record().getLocation());

	if (config != null) {
		authConfig.mergeIn(config);
	}

	OAuth2FlowType flow = OAuth2FlowType.valueOf(authConfig.getString("flow.type", "AUTH_CODE").toUpperCase());

	if (authConfig.getBoolean("type.keycloak")) {
		return OAuth2Auth.createKeycloak(vertx, flow, authConfig);
	} else {
		return OAuth2Auth.create(vertx, flow, new OAuth2ClientOptions(authConfig));
	}
}
 
开发者ID:pflima92,项目名称:jspare-vertx-ms-blueprint,代码行数:17,代码来源:OAuth2ServiceImpl.java

示例5: subscriptionResult

import io.vertx.core.json.JsonObject; //导入方法依赖的package包/类
private void subscriptionResult(final AsyncResult<HttpResponse<JsonArray>> ar) {
	if (ar.succeeded()) {
		// Process the result
		this.captureCookies(ar.result().cookies());
		final JsonArray receivedData = ar.result().body();
		final JsonObject status = receivedData.getJsonObject(receivedData.size() - 1);
		if (status.getBoolean("successful", false)) {
			// If the array has only one member we didn't get new data
			if (receivedData.size() > 1) {
				this.processReceivedData(receivedData);
			}
			// Do it again eventually
			if (!this.shuttingDown && !this.shutdownCompleted) {
				this.subscriptionFetch();
			} else {
				this.shutdownCompleted = true;
			}
		} else {
			// We won't continue
			this.logger.fatal(status.encodePrettily());
			this.shutdownCompleted = true;
		}

	} else {
		// Preliminary stopping here
		// needs to be handled
		this.logger.fatal(ar.cause());
		this.shutdownCompleted = true;
	}
}
 
开发者ID:Stwissel,项目名称:vertx-sfdc-platformevents,代码行数:31,代码来源:CometD.java

示例6: EventBusSink

import io.vertx.core.json.JsonObject; //导入方法依赖的package包/类
public EventBusSink(Vertx vertx, JsonObject json) {
  name = json.getString("name");
  address = json.getString("address", name);

  if (address == null) {
    throw new IllegalArgumentException("The name or the address must be set");
  }

  publish = json.getBoolean("publish", true);

  eventBus = vertx.eventBus();
}
 
开发者ID:cescoffier,项目名称:fluid,代码行数:13,代码来源:EventBusSink.java


注:本文中的io.vertx.core.json.JsonObject.getBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。