下面列出了怎么用org.springframework.http.server.reactive.SslInfo的API类实例代码及写法,或者点击链接到github查看源代码。
private MockServerHttpRequest(HttpMethod httpMethod, URI uri, @Nullable String contextPath,
HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies,
@Nullable InetSocketAddress remoteAddress, @Nullable SslInfo sslInfo,
Publisher<? extends DataBuffer> body) {
super(uri, contextPath, headers);
this.httpMethod = httpMethod;
this.cookies = cookies;
this.remoteAddress = remoteAddress;
this.sslInfo = sslInfo;
this.body = Flux.from(body);
}
private MockServerHttpRequest(HttpMethod httpMethod, URI uri, @Nullable String contextPath,
HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies,
@Nullable InetSocketAddress remoteAddress, @Nullable SslInfo sslInfo,
Publisher<? extends DataBuffer> body) {
super(uri, contextPath, headers);
this.httpMethod = httpMethod;
this.cookies = cookies;
this.remoteAddress = remoteAddress;
this.sslInfo = sslInfo;
this.body = Flux.from(body);
}
private MockServerHttpRequest(HttpMethod httpMethod, URI uri, @Nullable String contextPath,
HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies,
@Nullable InetSocketAddress remoteAddress, @Nullable SslInfo sslInfo,
Publisher<? extends DataBuffer> body) {
super(uri, contextPath, headers);
this.httpMethod = httpMethod;
this.cookies = cookies;
this.remoteAddress = remoteAddress;
this.sslInfo = sslInfo;
this.body = Flux.from(body);
}
private MockServerHttpRequest(HttpMethod httpMethod, URI uri, @Nullable String contextPath,
HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies,
@Nullable InetSocketAddress remoteAddress, @Nullable SslInfo sslInfo,
Publisher<? extends DataBuffer> body) {
super(uri, contextPath, headers);
this.httpMethod = httpMethod;
this.cookies = cookies;
this.remoteAddress = remoteAddress;
this.sslInfo = sslInfo;
this.body = Flux.from(body);
}
@Override
protected SslInfo initSslInfo() {
if (delegate.sslSession() == null) {
return null;
}
return new SslInfoImpl(delegate.sslSession());
}
@Override
protected SslInfo initSslInfo() {
final Optional<Channel> channel = channelResolver.resolveChannel(request);
if (channel.isPresent()) {
SslHandler sslHandler = channel.get().pipeline().get(SslHandler.class);
if (sslHandler != null) {
SSLSession session = sslHandler.engine().getSession();
return new DefaultSslInfo(session);
}
}
return null;
}
@Nullable
@Override
protected SslInfo initSslInfo() {
final SSLSession session = ctx.sslSession();
return session != null ? new DefaultSslInfo(session)
: null;
}
@Nullable
@Override
protected SslInfo initSslInfo() {
return this.sslInfo;
}
@Nullable
@Override
protected SslInfo initSslInfo() {
return this.sslInfo;
}
@Nullable
@Override
protected SslInfo initSslInfo() {
return this.sslInfo;
}
@Nullable
@Override
protected SslInfo initSslInfo() {
return this.sslInfo;
}