diff --git a/_solon_extend/solon.boot.vertx/pom.xml b/_solon_extend/solon.boot.vertx/pom.xml deleted file mode 100644 index 633e89481f..0000000000 --- a/_solon_extend/solon.boot.vertx/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - - - org.noear - solon-parent - 1.9.2 - ../../solon-parent/pom.xml - - - solon.boot.vertx - jar - - - - - org.noear - solon.boot - - - - io.vertx - vertx-core - 3.5.4 - - - - \ No newline at end of file diff --git a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/VertxServer.java b/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/VertxServer.java deleted file mode 100644 index 84737d393b..0000000000 --- a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/VertxServer.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.noear.solon.boot.vertx; - -import io.vertx.core.Vertx; -import io.vertx.core.http.HttpServer; -import io.vertx.core.http.HttpServerResponse; -import org.noear.solon.Utils; -import org.noear.solon.boot.ServerLifecycle; -import org.noear.solon.boot.vertx.http.VertxHttpHandler; - -/** - * @author noear - * @since 1.8 - */ -public class VertxServer implements ServerLifecycle { - HttpServer server; - - @Override - public void start(String host, int port) throws Throwable { - server = Vertx.vertx().createHttpServer(); - - server.requestHandler(new VertxHttpHandler()); - - if (Utils.isEmpty(host)) { - server.listen(port); - } else { - server.listen(port, host); - } - } - - @Override - public void stop() throws Throwable { - if (server != null) { - server.close(); - } - } -} diff --git a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/XPluginImp.java b/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/XPluginImp.java deleted file mode 100644 index 2a45cd6d00..0000000000 --- a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/XPluginImp.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.noear.solon.boot.vertx; - -import org.noear.solon.core.AopContext; -import org.noear.solon.core.Plugin; - -/** - * @author noear 2022/6/7 created - */ -public class XPluginImp implements Plugin { - @Override - public void start(AopContext context) { - - } -} diff --git a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/http/VertxHttpContext.java b/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/http/VertxHttpContext.java deleted file mode 100644 index 6bc1f98f26..0000000000 --- a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/http/VertxHttpContext.java +++ /dev/null @@ -1,202 +0,0 @@ -package org.noear.solon.boot.vertx.http; - -import io.vertx.core.http.HttpServerRequest; -import io.vertx.core.http.HttpServerResponse; -import org.noear.solon.core.NvMap; -import org.noear.solon.core.handle.Context; -import org.noear.solon.core.handle.UploadedFile; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; -import java.util.List; -import java.util.Map; - -/** - * @author noear - * @since 1.8 - */ -public class VertxHttpContext extends Context { - HttpServerRequest request; - HttpServerResponse response; - - VertxHttpContext(HttpServerRequest request){ - this.request = request; - this.response = request.response(); - - } - @Override - public Object request() { - return request; - } - - private String _ip; - @Override - public String ip() { - if (_ip == null) { - _ip = request.remoteAddress().host(); - } - - return _ip; - } - - @Override - public String method() { - return request.method().name(); - } - - @Override - public String protocol() { - if (request.isSSL()) { - return "https"; - } else { - return "http"; - } - } - - private URI _uri; - - @Override - public URI uri() { - if (_uri == null) { - _uri = URI.create(url()); - } - return _uri; - } - - private String _url; - @Override - public String url() { - if(_url == null){ - _url = request.absoluteURI(); - } - - return _url; - } - - @Override - public long contentLength() { - return 0; - } - - @Override - public String contentType() { - return null; - } - - @Override - public String queryString() { - return null; - } - - @Override - public InputStream bodyAsStream() throws IOException { - return null; - } - - @Override - public String[] paramValues(String name) { - return new String[0]; - } - - @Override - public String param(String name) { - return null; - } - - @Override - public String param(String name, String def) { - return null; - } - - @Override - public NvMap paramMap() { - return null; - } - - @Override - public Map> paramsMap() { - return null; - } - - @Override - public List files(String name) throws Exception { - return null; - } - - @Override - public NvMap cookieMap() { - return null; - } - - @Override - public NvMap headerMap() { - return null; - } - - @Override - public Object response() { - return response; - } - - @Override - protected void contentTypeDoSet(String contentType) { - - } - - @Override - public void output(byte[] bytes) { - - } - - @Override - public void output(InputStream stream) { - - } - - @Override - public OutputStream outputStream() throws IOException { - return null; - } - - @Override - public void headerSet(String name, String val) { - - } - - @Override - public void headerAdd(String name, String val) { - - } - - @Override - public void cookieSet(String name, String val, String domain, String path, int maxAge) { - - } - - @Override - public void redirect(String url) { - - } - - @Override - public void redirect(String url, int code) { - - } - - @Override - public int status() { - return 0; - } - - @Override - protected void statusDoSet(int status) { - - } - - @Override - public void flush() throws IOException { - - } -} diff --git a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/http/VertxHttpHandler.java b/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/http/VertxHttpHandler.java deleted file mode 100644 index 2524c6eedd..0000000000 --- a/_solon_extend/solon.boot.vertx/src/main/java/org/noear/solon/boot/vertx/http/VertxHttpHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.noear.solon.boot.vertx.http; - -import io.vertx.core.Handler; -import io.vertx.core.http.HttpServerRequest; -import io.vertx.core.http.HttpServerResponse; - -/** - * @author noear - * @since 1.8 - */ -public class VertxHttpHandler implements Handler { - @Override - public void handle(HttpServerRequest request) { - // This handler gets called for each request that arrives on the - // server - HttpServerResponse response = request.response(); - response.putHeader("content-type", "text/plain"); - - // Write to the response and end it - response.end("Hello vertx!"); - } -} diff --git a/solon-parent/pom.xml b/solon-parent/pom.xml index a8aa9240e4..72a9bbc4be 100644 --- a/solon-parent/pom.xml +++ b/solon-parent/pom.xml @@ -1361,7 +1361,6 @@ ../_solon_extend/solon.boot.smarthttp ../_solon_extend/solon.boot.jetty ../_solon_extend/solon.boot.undertow - ../_solon_extend/solon.boot.vertx ../_solon_extend/solon.boot.tomcat ../_solon_extend/solon.boot.websocket