Search in sources :

Example 1 with HttpServer

use of com.akaxin.site.connector.http.HttpServer in project openzaly by akaxincom.

the class Bootstrap method startHttpServer.

/**
 * 启动Http服务,提供与扩展服务之间的hai(http application interface)接口功能
 *
 * @throws Exception
 */
private static void startHttpServer(String address, int port) throws Exception {
    new HttpServer() {

        @Override
        public void loadExecutor(AbstracteExecutor<Command, CommandResponse> executor) {
            executor.addChain(HttpUriAction.HTTP_ACTION.getUri(), new HttpRequestHandler());
        }
    }.start(address, port);
    logger.info("{} start http server {}:{} ok.", AkxProject.PLN, address, port);
}
Also used : Command(com.akaxin.common.command.Command) HttpRequestHandler(com.akaxin.site.connector.handler.HttpRequestHandler) HttpServer(com.akaxin.site.connector.http.HttpServer) CommandResponse(com.akaxin.common.command.CommandResponse)

Aggregations

Command (com.akaxin.common.command.Command)1 CommandResponse (com.akaxin.common.command.CommandResponse)1 HttpRequestHandler (com.akaxin.site.connector.handler.HttpRequestHandler)1 HttpServer (com.akaxin.site.connector.http.HttpServer)1