| 限定符和类型 | 方法和说明 |
|---|---|
void |
ChannelInfo.setProtocol(Protocol protocol) |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
RpcClient.getProtocol() |
| 限定符和类型 | 字段和说明 |
|---|---|
protected Protocol |
AbstractBrpcChannel.protocol |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
BrpcChannel.getProtocol() |
Protocol |
AbstractBrpcChannel.getProtocol() |
| 构造器和说明 |
|---|
AbstractBrpcChannel(ServiceInstance serviceInstance,
io.netty.bootstrap.Bootstrap bootstrap,
Protocol protocol,
RpcClient rpcClient) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
AbstractProtocol
An abstract protocol used to simplify tcp protocol implementations.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
ProtocolFactory.createProtocol(String encoding) |
Protocol |
ProtocolManager.getProtocol(Integer protocolType) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<Protocol> |
ProtocolManager.getCoexistenceProtocols() |
Map<Integer,Protocol> |
ProtocolManager.getProtocolMap() |
| 限定符和类型 | 类和说明 |
|---|---|
class |
HttpRpcProtocol
处理http rpc协议,包括四种序列化格式:
1、http + protobuf
2、http + json
|
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
HttpJsonProtocolFactory.createProtocol(String encoding) |
Protocol |
HttpProtobufProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
HuluRpcProtocol
Notes on HULU PBRPC Protocol:
Header format is ["HULU"][
body_size][meta_size
], 12 bytes in total
body_size and meta_size are NOT in
network byte order (little endian)
Use service->name() and method_index to identify the service and
method to call
user_message_size is set iff request/response has attachment
The following fields of rpc are not supported yet:
chunk_info
|
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
HuluRpcProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
NSHeadJsonProtocol |
class |
NSHeadProtobufProtocol |
class |
NSHeadRpcProtocol
nshead based protocol, the header format is
NSHead |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
NSHeadProtobufProtocolFactory.createProtocol(String encoding) |
Protocol |
NSHeadJsonProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
PublicPbrpcProtocol |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
PublicPbRpcProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
ServerPushProtocol |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
ServerPushProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
DefaultServerPushProtocol |
| 限定符和类型 | 类和说明 |
|---|---|
class |
SofaRpcProtocol
Notes on SOFA PBRPC Protocol:
Header format is ["SOFA"][
meta_size]
[body_size(64)][message_size(64)],
24 bytes in total
body_size and meta_size are NOT in
network byte order (little endian)
meta of request and response are same, distinguished by SofaRpcMeta#type
sofa-pbrpc does not conduct log_id. |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
SofaRpcProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
BaiduRpcProtocol
Notes on Baidu RPC Protocol:
Header format is ["PRPC"][
body_size][meta_size
], 12 bytes in total
body_size and meta_size are in network byte
order (big endian)
Use service->full_name() and method_name to identify the service and
method to call
attachment_size is set iff request/response has attachment
The following fields of rpc are not supported yet:
chunk_info
Created by huwenwei on 2017/9/22. |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
BaiduRpcProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
StargateRpcProtocol
Stargate Byte format
head = body体长度,使用一个4位byte表示
+--------------------------------------+----------------+
+ 00000000 00000000 00000000 00000111 | 14 bytes |
+ byte[3] byte[2] byte[1] byte[0] | "HELLO, WORLD" |
+-----------------------------------+----------------+
|
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
StargateRpcProtocolFactory.createProtocol(String encoding) |
| 限定符和类型 | 方法和说明 |
|---|---|
Protocol |
RpcServer.getProtocol() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
RpcServer.setProtocol(Protocol protocol) |
Copyright © 2019 Baidu, Inc.. All rights reserved.