同步获取响应数据

This commit is contained in:
Guoqs
2024-08-01 15:38:33 +08:00
parent cd8ae84bdf
commit 201137bb9f
5 changed files with 16 additions and 20 deletions

View File

@@ -9,7 +9,6 @@ import com.jsowell.common.enums.ykc.PileChannelEntity;
import com.jsowell.common.util.BytesUtil;
import com.jsowell.common.util.CRC16Util;
import com.jsowell.common.util.DateUtils;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
@@ -26,9 +25,9 @@ public abstract class AbstractHandler implements InitializingBean {
* 执行逻辑
* 有应答
*/
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
throw new UnsupportedOperationException();
}
// public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
// throw new UnsupportedOperationException();
// }
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, ChannelHandlerContext channel) {
throw new UnsupportedOperationException();

View File

@@ -7,7 +7,6 @@ import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
import com.jsowell.common.util.BytesUtil;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.netty.factory.YKCOperateFactory;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

View File

@@ -13,7 +13,7 @@ public class RpcResponseHandler extends SimpleChannelInboundHandler<RpcResponse>
if(syncPromise != null) {
// 设置响应结果
syncPromise.setRpcResponse(msg);
// syncPromise.setRpcResponse(msg);
// 唤醒外部线程
syncPromise.wake();