本文整理了Java中io.vertx.reactivex.core.MultiMap.get()
方法的一些代码示例,展示了MultiMap.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.get()
方法的具体详情如下:
包路径:io.vertx.reactivex.core.MultiMap
类名称:MultiMap
方法名:get
暂无
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
private User convert(MultiMap params) {
User user = new User();
user.setUsername(params.get("username"));
user.setFirstName(params.get("firstName"));
user.setLastName(params.get("lastName"));
user.setEmail(params.get("email"));
user.setPassword(params.get("password"));
return user;
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
private User convert(MultiMap params) {
User user = new User();
user.setUsername(params.get("username"));
user.setFirstName(params.get("firstName"));
user.setLastName(params.get("lastName"));
user.setEmail(params.get("email"));
user.setPassword(params.get("password"));
return user;
}
}
代码示例来源:origin: Cognifide/knotx
private static Optional<String> getFormIdentifierFromRequest(KnotContext knotContext,
String formIdAttrName) {
return Optional.ofNullable(
knotContext.getClientRequest().getFormAttributes().get(formIdAttrName));
}
代码示例来源:origin: io.knotx/knotx-databridge-adapter-http
@Override
String getValue(ClientRequest request, String placeholder) {
return request.getHeaders().get(getName(placeholder));
}
},
代码示例来源:origin: io.knotx/knotx-databridge-adapter-http
@Override
String getValue(ClientRequest request, String placeholder) {
return request.getParams().get(getName(placeholder));
}
};
代码示例来源:origin: Cognifide/knotx
@Override
String getValue(ClientRequest request, String placeholder) {
return request.getHeaders().get(getName(placeholder));
}
},
代码示例来源:origin: Cognifide/knotx
@Override
String getValue(ClientRequest request, String placeholder) {
return request.getParams().get(getName(placeholder));
}
};
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
private void parseScopeParameter(RoutingContext context) {
// Check scope parameter
String scopes = context.request().params().get(OAuth2Constants.SCOPE);
if (scopes != null && scopes.isEmpty()) {
throw new InvalidScopeException("Invalid parameter: scope must not be empty");
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
private void parseScopeParameter(RoutingContext context) {
// Check scope parameter
String scopes = context.request().params().get(OAuth2Constants.SCOPE);
if (scopes != null && scopes.isEmpty()) {
throw new InvalidScopeException("Invalid parameter: scope must not be empty");
}
}
}
代码示例来源:origin: me.escoffier.fluid/vertx-eventbus-connector
private static <T> Message<T> createData(io.vertx.reactivex.core.eventbus.Message<T> msg) {
Map<String, Object> map = new HashMap<>();
msg.headers().names().forEach(s -> map.put(s, msg.headers().get(s)));
map.put(CommonHeaders.ORIGINAL, msg);
return new Message<>(msg.body(), map);
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
public AuthorizationRequest create(HttpServerRequest request) {
AuthorizationRequest authorizationRequest = new AuthorizationRequest();
authorizationRequest.setClientId(request.params().get(OAuth2Constants.CLIENT_ID));
authorizationRequest.setResponseType(request.params().get(OAuth2Constants.RESPONSE_TYPE));
authorizationRequest.setRedirectUri(request.params().get(OAuth2Constants.REDIRECT_URI));
String scope = request.params().get(OAuth2Constants.SCOPE);
authorizationRequest.setScopes(scope != null ? new HashSet<>(Arrays.asList(scope.split("\\s+"))) : null);
authorizationRequest.setState(request.params().get(OAuth2Constants.STATE));
authorizationRequest.setRequestParameters(extractRequestParameters(request));
authorizationRequest.setAdditionalParameters(extractAdditionalParameters(request));
return authorizationRequest;
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
public AuthorizationRequest create(HttpServerRequest request) {
AuthorizationRequest authorizationRequest = new AuthorizationRequest();
authorizationRequest.setClientId(request.params().get(OAuth2Constants.CLIENT_ID));
authorizationRequest.setResponseType(request.params().get(OAuth2Constants.RESPONSE_TYPE));
authorizationRequest.setRedirectUri(request.params().get(OAuth2Constants.REDIRECT_URI));
String scope = request.params().get(OAuth2Constants.SCOPE);
authorizationRequest.setScopes(scope != null ? new HashSet<>(Arrays.asList(scope.split("\\s+"))) : null);
authorizationRequest.setState(request.params().get(OAuth2Constants.STATE));
authorizationRequest.setRequestParameters(extractRequestParameters(request));
authorizationRequest.setAdditionalParameters(extractAdditionalParameters(request));
return authorizationRequest;
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
private boolean returnFromLoginPage(RoutingContext context) {
String referer = context.request().headers().get(HttpHeaders.REFERER);
try {
return referer != null && UriBuilder.fromURIString(referer).build().getPath().contains('/' + domain.getPath() + "/login");
} catch (URISyntaxException e) {
logger.debug("Unable to calculate referer url : {}", referer, e);
return false;
}
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
private void parseScopeParameter(RoutingContext context) {
// Check scope parameter
String scopes = context.request().params().get(OAuth2Constants.SCOPE);
if (scopes != null && scopes.isEmpty()) {
throw new InvalidScopeException("Invalid parameter: scope must not be empty");
}
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
private void parseScopeParameter(RoutingContext context) {
// Check scope parameter
String scopes = context.request().params().get(OAuth2Constants.SCOPE);
if (scopes != null && scopes.isEmpty()) {
throw new InvalidScopeException("Invalid parameter: scope must not be empty");
}
}
代码示例来源:origin: io.gravitee.am.gateway.handlers/gravitee-am-gateway-handler
public TokenRequest create(HttpServerRequest request) {
TokenRequest tokenRequest = new TokenRequest();
tokenRequest.setClientId(request.params().get(OAuth2Constants.CLIENT_ID));
tokenRequest.setGrantType(request.params().get(OAuth2Constants.GRANT_TYPE));
String scopes = request.params().get(OAuth2Constants.SCOPE);
if (scopes != null) {
tokenRequest.setScopes(new HashSet<>(Arrays.asList(scopes.split("\\s+"))));
}
tokenRequest.setRequestParameters(extractRequestParameters(request));
tokenRequest.setAdditionalParameters(extractAdditionalParameters(request));
return tokenRequest;
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
public TokenRequest create(HttpServerRequest request) {
TokenRequest tokenRequest = new TokenRequest();
tokenRequest.setClientId(request.params().get(OAuth2Constants.CLIENT_ID));
tokenRequest.setGrantType(request.params().get(OAuth2Constants.GRANT_TYPE));
String scopes = request.params().get(OAuth2Constants.SCOPE);
if (scopes != null) {
tokenRequest.setScopes(new HashSet<>(Arrays.asList(scopes.split("\\s+"))));
}
tokenRequest.setRequestParameters(extractRequestParameters(request));
tokenRequest.setAdditionalParameters(extractAdditionalParameters(request));
return tokenRequest;
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
private boolean returnFromLoginPage(RoutingContext context) {
String referer = context.request().headers().get(HttpHeaders.REFERER);
try {
return referer != null && UriBuilder.fromURIString(referer).build().getPath().contains('/' + domain.getPath() + "/login");
} catch (URISyntaxException e) {
logger.debug("Unable to calculate referer url : {}", referer, e);
return false;
}
}
}
代码示例来源:origin: io.knotx/knotx-core
private Observable<HttpClientResponse> get(HttpClient client, RequestOptions requestOptions,
MultiMap headers) {
return Observable.unsafeCreate(subscriber -> {
HttpClientRequest req = client.get(requestOptions);
req.headers().addAll(headers);
if (headers.get(HttpHeaderNames.HOST.toString()) != null) {
req.setHost(headers.get(HttpHeaderNames.HOST.toString()));
}
Observable<HttpClientResponse> resp = req.toObservable();
resp.subscribe(subscriber);
req.end();
});
}
代码示例来源:origin: Cognifide/knotx
private Observable<HttpClientResponse> get(HttpClient client, RequestOptions requestOptions,
MultiMap headers) {
return Observable.unsafeCreate(subscriber -> {
HttpClientRequest req = client.get(requestOptions);
req.headers().addAll(headers);
if (headers.get(HttpHeaderNames.HOST.toString()) != null) {
req.setHost(headers.get(HttpHeaderNames.HOST.toString()));
}
Observable<HttpClientResponse> resp = req.toObservable();
resp.subscribe(subscriber);
req.end();
});
}
内容来源于网络,如有侵权,请联系作者删除!