Skip to content

Commit

Permalink
chore: update http facade to 0.1.0
Browse files Browse the repository at this point in the history
Signed-off-by: ZhangJian He <shoothzj@gmail.com>
  • Loading branch information
shoothzj committed Oct 4, 2024
1 parent 1da7f23 commit f4108f6
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 31 deletions.
5 changes: 5 additions & 0 deletions ci/spotbugs/exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"/>
</Match>

<Match>
<Bug pattern="DLS_DEAD_LOCAL_STORE"/>
<Class name="io.github.protocol.mtconnect.examples.MtConnectClientExample"/>
</Match>

</FindBugsFilter>
4 changes: 2 additions & 2 deletions mtconnect-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<dependencies>
<dependency>
<groupId>io.github.shoothzj</groupId>
<artifactId>http-facade-client</artifactId>
<groupId>io.github.openfacade</groupId>
<artifactId>http-facade</artifactId>
<version>${http-facade.version}</version>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.protocol.mtconnect.client;

import io.github.shoothzj.http.facade.client.HttpClient;
import io.github.shoothzj.http.facade.client.HttpClientFactory;
import io.github.openfacade.http.HttpClient;
import io.github.openfacade.http.HttpClientFactory;

public class MtConnectClient {
private final MtConnectClientConfiguration config;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.protocol.mtconnect.client;

import io.github.shoothzj.http.facade.client.HttpClientConfig;
import io.github.openfacade.http.HttpClientConfig;
import lombok.Setter;

@Setter
Expand Down
10 changes: 10 additions & 0 deletions mtconnect-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<artifactId>mtconnect-examples</artifactId>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>io.github.protocol-laboratory</groupId>
<artifactId>mtconnect-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package io.github.protocol.mtconnect.examples;

import io.github.openfacade.http.HttpClientConfig;
import io.github.protocol.mtconnect.client.MtConnectClient;
import io.github.protocol.mtconnect.client.MtConnectClientConfiguration;

public class MtConnectClientExample {
public static void main(String[] args) {
MtConnectClientConfiguration configuration = new MtConnectClientConfiguration();
new MtConnectClient(configuration);
HttpClientConfig httpClientConfig = new HttpClientConfig.Builder().build();
configuration.setHttpConfig(httpClientConfig);
MtConnectClient mtConnectClient = new MtConnectClient(configuration);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
package io.github.protocol.mtconnect.examples;

import io.github.openfacade.http.HttpServerConfig;
import io.github.openfacade.http.HttpServerEngine;
import io.github.protocol.mtconnect.server.MtConnectServer;
import io.github.protocol.mtconnect.server.MtConnectServerConfiguration;

public class MtConnectServerExample {
public static void main(String[] args) {
MtConnectServerConfiguration configuration = new MtConnectServerConfiguration();
HttpServerConfig httpServerConfig = new HttpServerConfig.Builder()
.engine(HttpServerEngine.Vertx)
.host("127.0.0.1")
.port(36633)
.build();
configuration.setHttpConfig(httpServerConfig);
MtConnectServer mtConnectServer = new MtConnectServer(configuration);
mtConnectServer.start().join();
}
Expand Down
4 changes: 2 additions & 2 deletions mtconnect-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<dependencies>
<dependency>
<groupId>io.github.shoothzj</groupId>
<artifactId>http-facade-server</artifactId>
<groupId>io.github.openfacade</groupId>
<artifactId>http-facade</artifactId>
<version>${http-facade.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.protocol.mtconnect.server;

import io.github.shoothzj.http.facade.core.HttpMethod;
import io.github.shoothzj.http.facade.server.HttpServer;
import io.github.shoothzj.http.facade.server.HttpServerFactory;
import io.github.openfacade.http.HttpMethod;
import io.github.openfacade.http.HttpServer;
import io.github.openfacade.http.HttpServerFactory;

import java.util.concurrent.CompletableFuture;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
package io.github.protocol.mtconnect.server;

import io.github.shoothzj.http.facade.server.HttpServerConfig;
import io.github.openfacade.http.HttpServerConfig;
import lombok.Setter;

@Setter
public class MtConnectServerConfiguration {
private String host;

private int port;

private HttpServerConfig httpConfig;

public MtConnectServerConfiguration() {
}

public String host() {
return host;
}

public int port() {
return port;
}

public HttpServerConfig httpConfig() {
return httpConfig;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package io.github.protocol.mtconnect.server;


public interface MtHandler {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package io.github.protocol.mtconnect.server;



public class MtHandlerImpl implements MtHandler {
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.protocol.mtconnect.server;

import io.github.shoothzj.http.facade.core.HttpRequest;
import io.github.shoothzj.http.facade.core.HttpResponse;
import io.github.shoothzj.http.facade.server.RequestHandler;
import io.github.openfacade.http.HttpRequest;
import io.github.openfacade.http.HttpResponse;
import io.github.openfacade.http.RequestHandler;
import lombok.Getter;
import lombok.Setter;

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<src.dir>src/main/java</src.dir>
<!-- dependency -->
<http-facade.version>0.0.2</http-facade.version>
<http-facade.version>0.1.0</http-facade.version>
<junit.version>5.11.0</junit.version>
<log4j.version>2.20.0</log4j.version>
<lombok.version>1.18.34</lombok.version>
Expand Down

0 comments on commit f4108f6

Please sign in to comment.