forked from aeraki-mesh/meta-protocol-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdubbo_hessian2_serializer_impl.h
35 lines (27 loc) · 1.17 KB
/
dubbo_hessian2_serializer_impl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include "src/application_protocols/dubbo/message_impl.h"
#include "src/application_protocols/dubbo/serializer.h"
namespace Envoy {
namespace Extensions {
namespace NetworkFilters {
namespace MetaProtocolProxy {
namespace Dubbo {
class DubboHessian2SerializerImpl : public Serializer {
public:
const std::string& name() const override {
return ProtocolSerializerNames::get().fromType(ProtocolType::Dubbo, type());
}
SerializationType type() const override { return SerializationType::Hessian2; }
std::pair<RpcInvocationSharedPtr, bool>
deserializeRpcInvocation(Buffer::Instance& buffer, ContextSharedPtr context) override;
size_t serializeRpcInvocation(Buffer::Instance& output_buffer) override;
std::pair<RpcResultSharedPtr, bool> deserializeRpcResult(Buffer::Instance& buffer,
ContextSharedPtr context) override;
size_t serializeRpcResult(Buffer::Instance& output_buffer, const std::string& content,
RpcResponseType type) override;
};
} // namespace Dubbo
} // namespace MetaProtocolProxy
} // namespace NetworkFilters
} // namespace Extensions
} // namespace Envoy