Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
9a4b98d2
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9a4b98d2
编写于
4月 15, 2016
作者:
S
Stephane Maldini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update HttpClient with Inbound/Outbound contract split
上级
4431a76a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
10 deletion
+10
-10
spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpRequest.java
...mework/http/client/reactive/ReactorClientHttpRequest.java
+1
-1
spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java
...ework/http/client/reactive/ReactorClientHttpResponse.java
+6
-6
spring-web-reactive/src/main/java/org/springframework/http/server/reactive/ReactorHttpHandlerAdapter.java
...ework/http/server/reactive/ReactorHttpHandlerAdapter.java
+2
-2
spring-web-reactive/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java
...ework/http/server/reactive/ReactorServerHttpResponse.java
+1
-1
未找到文件。
spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpRequest.java
浏览文件 @
9a4b98d2
...
...
@@ -111,7 +111,7 @@ public class ReactorClientHttpRequest extends AbstractClientHttpRequest {
})
.
after
(()
->
{
if
(
body
!=
null
)
{
return
channel
.
send
(
body
);
return
channel
.
send
Body
(
body
);
}
else
{
return
channel
.
sendHeaders
();
...
...
spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java
浏览文件 @
9a4b98d2
...
...
@@ -19,7 +19,7 @@ package org.springframework.http.client.reactive;
import
java.util.Collection
;
import
reactor.core.publisher.Flux
;
import
reactor.io.netty.http.Http
Channel
;
import
reactor.io.netty.http.Http
Inbound
;
import
org.springframework.core.io.buffer.DataBuffer
;
import
org.springframework.core.io.buffer.DataBufferAllocator
;
...
...
@@ -40,29 +40,29 @@ public class ReactorClientHttpResponse implements ClientHttpResponse {
private
final
DataBufferAllocator
allocator
;
private
final
Http
Channel
channel
;
private
final
Http
Inbound
channel
;
public
ReactorClientHttpResponse
(
Http
Channel
channel
,
DataBufferAllocator
allocator
)
{
public
ReactorClientHttpResponse
(
Http
Inbound
channel
,
DataBufferAllocator
allocator
)
{
this
.
allocator
=
allocator
;
this
.
channel
=
channel
;
}
@Override
public
Flux
<
DataBuffer
>
getBody
()
{
return
channel
.
receive
().
map
(
b
->
allocator
.
wrap
(
b
.
byteBuffer
()));
return
channel
.
receive
Body
().
map
(
b
->
allocator
.
wrap
(
b
.
byteBuffer
()));
}
@Override
public
HttpHeaders
getHeaders
()
{
HttpHeaders
headers
=
new
HttpHeaders
();
this
.
channel
.
responseH
eaders
().
entries
().
stream
().
forEach
(
e
->
headers
.
add
(
e
.
getKey
(),
e
.
getValue
()));
this
.
channel
.
h
eaders
().
entries
().
stream
().
forEach
(
e
->
headers
.
add
(
e
.
getKey
(),
e
.
getValue
()));
return
headers
;
}
@Override
public
HttpStatus
getStatusCode
()
{
return
HttpStatus
.
valueOf
(
this
.
channel
.
responseS
tatus
().
code
());
return
HttpStatus
.
valueOf
(
this
.
channel
.
s
tatus
().
code
());
}
@Override
...
...
spring-web-reactive/src/main/java/org/springframework/http/server/reactive/ReactorHttpHandlerAdapter.java
浏览文件 @
9a4b98d2
...
...
@@ -18,7 +18,7 @@ package org.springframework.http.server.reactive;
import
reactor.core.publisher.Mono
;
import
reactor.io.buffer.Buffer
;
import
reactor.io.ipc.Channel
Flux
Handler
;
import
reactor.io.ipc.ChannelHandler
;
import
reactor.io.netty.http.HttpChannel
;
import
org.springframework.core.io.buffer.DataBufferAllocator
;
...
...
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
* @author Stephane Maldini
*/
public
class
ReactorHttpHandlerAdapter
implements
Channel
Flux
Handler
<
Buffer
,
Buffer
,
HttpChannel
>
{
implements
ChannelHandler
<
Buffer
,
Buffer
,
HttpChannel
>
{
private
final
HttpHandler
httpHandler
;
...
...
spring-web-reactive/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java
浏览文件 @
9a4b98d2
...
...
@@ -55,7 +55,7 @@ public class ReactorServerHttpResponse extends AbstractServerHttpResponse {
@Override
public
void
setStatusCode
(
HttpStatus
status
)
{
getReactorChannel
().
responseS
tatus
(
HttpResponseStatus
.
valueOf
(
status
.
value
()));
getReactorChannel
().
s
tatus
(
HttpResponseStatus
.
valueOf
(
status
.
value
()));
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录