Class OutboundCommandHandler<C>

java.lang.Object
com.sankcrm.erp.apisix.application.command.outbound.OutboundCommandHandler<C>
All Implemented Interfaces:
com.sankcrm.erp.bus.CommandHandler<String,OutboundCommand<C>>

@Component("apisixOutboundCommandHandler") public class OutboundCommandHandler<C> extends Object implements com.sankcrm.erp.bus.CommandHandler<String,OutboundCommand<C>>
发送请求.
Since:
2.1.0
Author:
zhsxin
create time:
2023/4/4 下午3:29
  • Constructor Details

    • OutboundCommandHandler

      public OutboundCommandHandler()
  • Method Details

    • handle

      public String handle(OutboundCommand<C> command) throws com.sankcrm.erp.common.exception.CoreException
      Specified by:
      handle in interface com.sankcrm.erp.bus.CommandHandler<String,OutboundCommand<C>>
      Throws:
      com.sankcrm.erp.common.exception.CoreException
    • requestCallback

      protected org.springframework.web.client.RequestCallback requestCallback(C command, com.sankcrm.erp.common.sensitive.SecretKey token)
    • responseExtractor

      protected org.springframework.web.client.ResponseExtractor<String> responseExtractor()
    • read

      protected String read(org.springframework.http.client.ClientHttpResponse message) throws IOException
      读响应报文
      Parameters:
      message - 响应实体
      Returns:
      响应报文
      Throws:
      IOException
    • rest

      protected org.springframework.web.client.RestTemplate rest()
      HTTP请求工具
      Returns:
      RestTemplate