use of com.akaxin.site.business.service.HttpRequestService in project openzaly by akaxincom.
the class HttpRequestHandler method handle.
@Override
public CommandResponse handle(Command command) {
try {
ChannelHandlerContext context = command.getChannelContext();
if (context == null) {
logger.error("{} client={} http request error context={}", AkxProject.PLN, command.getClientIp(), context);
return null;
}
CommandResponse comamndResponse = new HttpRequestService().process(command);
comamndResponse.setVersion(CommandConst.PROTOCOL_VERSION);
comamndResponse.setAction(CommandConst.ACTION_RES);
String authKey = command.getField(PluginConst.PLUGIN_AUTH_KEY, String.class);
fullHttpResponse(context, comamndResponse, authKey);
return comamndResponse;
} catch (Exception e) {
logger.error("api request error.", e);
}
return null;
}
Aggregations