You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/09 11:58:29 UTC

[GitHub] [dubbo] mrgaom opened a new issue, #10901: DecodeHandler为什么要放在transport层呢

mrgaom opened a new issue, #10901:
URL: https://github.com/apache/dubbo/issues/10901

   如上所述:
   其实DecodeHandler的received方法中针对的是Request和Response语义的解码操作,但是该类被放到了transport层,这感觉有点违背了dubbo分层的约定。代码如下:
   ```java
   @Override
   public void received(Channel channel, Object message) throws RemotingException {
       if (message instanceof Decodeable) {
           decode(message);
       }
   
       if (message instanceof Request) {
           decode(((Request) message).getData());
       }
   
       if (message instanceof Response) {
           decode(((Response) message).getResult());
       }
   
       handler.received(channel, message);
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] mrgaom closed issue #10901: DecodeHandler为什么要放在transport层呢

Posted by GitBox <gi...@apache.org>.
mrgaom closed issue #10901: DecodeHandler为什么要放在transport层呢
URL: https://github.com/apache/dubbo/issues/10901


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org