@@ -33,7 +33,6 @@ public static class SimpleWebServerBuilder {
33
33
private int port ;
34
34
private String routerPath = "/api" ;
35
35
private String appBase = null ;
36
- private String serverId ;
37
36
private RestxMainRouter router ;
38
37
public SimpleWebServerBuilder setPort (int port ) {
39
38
this .port = port ;
@@ -50,23 +49,14 @@ public SimpleWebServerBuilder setAppBase(String appBase) {
50
49
return this ;
51
50
}
52
51
53
- public SimpleWebServerBuilder setServerId (String serverId ) {
54
- this .serverId = serverId ;
55
- return this ;
56
- }
57
-
58
52
public SimpleWebServerBuilder setRouter (RestxMainRouter router ) {
59
53
this .router = router ;
60
54
return this ;
61
55
}
62
56
63
57
public SimpleWebServer build () {
64
- if (serverId == null ) {
65
- serverId = "SimpleWebServer#" + SERVER_ID .incrementAndGet ();
66
- }
67
-
68
58
if (router == null ) {
69
- return new SimpleWebServer (serverId , routerPath , appBase , port ) {
59
+ return new SimpleWebServer (routerPath , appBase , port ) {
70
60
@ Override
71
61
protected RestxMainRouter setupRouter () {
72
62
return RestxMainRouterFactory .newInstance (
@@ -82,7 +72,7 @@ public synchronized void stop() throws Exception {
82
72
}
83
73
};
84
74
} else {
85
- return new SimpleWebServer (serverId , routerPath , appBase , port ) {
75
+ return new SimpleWebServer (routerPath , appBase , port ) {
86
76
@ Override
87
77
protected RestxMainRouter setupRouter () {
88
78
return router ;
@@ -104,7 +94,7 @@ public static SimpleWebServerBuilder builder() {
104
94
private RestxMainRouter router ;
105
95
private Connection connection ;
106
96
107
- private SimpleWebServer (String serverId , String routerPath , String appBase , int port ) {
97
+ private SimpleWebServer (String routerPath , String appBase , int port ) {
108
98
super (appBase , port , "localhost" , "SimpleFrameowkr" , "org.simpleframework" , "simple" );
109
99
110
100
this .routerPath = routerPath ;
0 commit comments