Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add generic invoke #11597

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
import org.apache.dubbo.remoting.utils.UrlUtils;
import org.apache.dubbo.rpc.AppResponse;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.support.ProtocolUtils;

import static org.apache.dubbo.rpc.Constants.INVOCATION_KEY;
import static org.apache.dubbo.rpc.Constants.SERIALIZATION_ID_KEY;

public class DubboCodecSupport {

public static Serialization getRequestSerialization(URL url, Invocation invocation) {
if ("$invoke".equals(invocation.getMethodName()) && ProtocolUtils.isProtobufGenericSerialization(url.getParameter("generic"))) {
return url.getOrDefaultFrameworkModel().getExtensionLoader(Serialization.class).getExtension("generic-protobuf-json");
}
Object serializationTypeObj = invocation.get(SERIALIZATION_ID_KEY);
if (serializationTypeObj != null) {
return CodecSupport.getSerializationById((byte) serializationTypeObj);
Expand Down