@@ -31,17 +31,21 @@ final class DJexConfig implements JexConfig {
31
31
private HttpServerProvider serverProvider ;
32
32
33
33
@ Override
34
- public JexConfig host (String host ) {
35
- this .host = host ;
36
- return this ;
34
+ public CompressionConfig compression () {
35
+ return compression ;
37
36
}
38
37
39
38
@ Override
40
- public JexConfig port ( int port ) {
41
- this . port = port ;
39
+ public JexConfig compression ( Consumer < CompressionConfig > consumer ) {
40
+ consumer . accept ( compression ) ;
42
41
return this ;
43
42
}
44
43
44
+ @ Override
45
+ public String contextPath () {
46
+ return contextPath ;
47
+ }
48
+
45
49
@ Override
46
50
public JexConfig contextPath (String contextPath ) {
47
51
if (!this .contextPath .equals (contextPath )) {
@@ -55,79 +59,74 @@ public JexConfig contextPath(String contextPath) {
55
59
}
56
60
57
61
@ Override
58
- public JexConfig socketBacklog (int socketBacklog ) {
59
- this .socketBacklog = socketBacklog ;
60
- return this ;
61
- }
62
-
63
- @ Override
64
- public JexConfig health (boolean health ) {
65
- this .health = health ;
66
- return this ;
62
+ public Executor executor () {
63
+ if (executor == null ) {
64
+ executor =
65
+ Executors .newThreadPerTaskExecutor (
66
+ Thread .ofVirtual ().name ("avaje-jex-http-" , 0 ).factory ());
67
+ }
68
+ return executor ;
67
69
}
68
70
69
71
@ Override
70
- public JexConfig ignoreTrailingSlashes ( boolean ignoreTrailingSlashes ) {
71
- this .ignoreTrailingSlashes = ignoreTrailingSlashes ;
72
+ public JexConfig executor ( Executor executor ) {
73
+ this .executor = executor ;
72
74
return this ;
73
75
}
74
76
75
77
@ Override
76
- public JexConfig jsonService (JsonService jsonService ) {
77
- this .jsonService = jsonService ;
78
- return this ;
78
+ public boolean health () {
79
+ return health ;
79
80
}
80
81
81
82
@ Override
82
- public JexConfig renderer ( String extension , TemplateRender renderer ) {
83
- renderers . put ( extension , renderer ) ;
83
+ public JexConfig health ( boolean health ) {
84
+ this . health = health ;
84
85
return this ;
85
86
}
86
87
87
88
@ Override
88
- public Executor executor () {
89
- if (executor == null ) {
90
- executor =
91
- Executors .newThreadPerTaskExecutor (
92
- Thread .ofVirtual ().name ("avaje-jex-http-" , 0 ).factory ());
93
- }
94
- return executor ;
89
+ public String host () {
90
+ return host ;
95
91
}
96
92
97
93
@ Override
98
- public JexConfig executor ( Executor executor ) {
99
- this .executor = executor ;
94
+ public JexConfig host ( String host ) {
95
+ this .host = host ;
100
96
return this ;
101
97
}
102
98
103
99
@ Override
104
- public String host () {
105
- return host ;
100
+ public HttpsConfigurator httpsConfig () {
101
+ return httpsConfig ;
106
102
}
107
103
108
104
@ Override
109
- public int port () {
110
- return port ;
105
+ public JexConfig httpsConfig (HttpsConfigurator httpsConfig ) {
106
+ this .httpsConfig = httpsConfig ;
107
+ return this ;
111
108
}
112
109
113
110
@ Override
114
- public String contextPath () {
115
- return contextPath ;
111
+ public boolean ignoreTrailingSlashes () {
112
+ return ignoreTrailingSlashes ;
116
113
}
117
114
118
115
@ Override
119
- public int socketBacklog () {
120
- return socketBacklog ;
116
+ public JexConfig ignoreTrailingSlashes (boolean ignoreTrailingSlashes ) {
117
+ this .ignoreTrailingSlashes = ignoreTrailingSlashes ;
118
+ return this ;
121
119
}
122
120
123
121
@ Override
124
- public boolean health () {
125
- return health ;
122
+ public int initialStreamBufferSize () {
123
+ return bufferInitial ;
126
124
}
127
125
128
126
@ Override
129
- public boolean ignoreTrailingSlashes () {
130
- return ignoreTrailingSlashes ;
127
+ public JexConfig initialStreamBufferSize (int initialSize ) {
128
+ bufferInitial = initialSize ;
129
+ return this ;
131
130
}
132
131
133
132
@ Override
@@ -136,67 +135,68 @@ public JsonService jsonService() {
136
135
}
137
136
138
137
@ Override
139
- public Map <String , TemplateRender > renderers () {
140
- return renderers ;
138
+ public JexConfig jsonService (JsonService jsonService ) {
139
+ this .jsonService = jsonService ;
140
+ return this ;
141
141
}
142
142
143
143
@ Override
144
- public String scheme () {
145
- return httpsConfig == null ? "http" : "https" ;
144
+ public long maxStreamBufferSize () {
145
+ return bufferMax ;
146
146
}
147
147
148
148
@ Override
149
- public HttpsConfigurator httpsConfig () {
150
- return httpsConfig ;
149
+ public JexConfig maxStreamBufferSize (long maxSize ) {
150
+ bufferMax = maxSize ;
151
+ return this ;
151
152
}
152
153
153
154
@ Override
154
- public JexConfig httpsConfig (HttpsConfigurator httpsConfig ) {
155
- this .httpsConfig = httpsConfig ;
156
- return this ;
155
+ public int port () {
156
+ return port ;
157
157
}
158
158
159
159
@ Override
160
- public JexConfig compression ( Consumer < CompressionConfig > consumer ) {
161
- consumer . accept ( compression ) ;
160
+ public JexConfig port ( int port ) {
161
+ this . port = port ;
162
162
return this ;
163
163
}
164
164
165
165
@ Override
166
- public CompressionConfig compression () {
167
- return compression ;
166
+ public JexConfig renderer (String extension , TemplateRender renderer ) {
167
+ renderers .put (extension , renderer );
168
+ return this ;
168
169
}
169
170
170
171
@ Override
171
- public long maxStreamBufferSize () {
172
- return bufferMax ;
172
+ public Map < String , TemplateRender > renderers () {
173
+ return renderers ;
173
174
}
174
175
175
176
@ Override
176
- public int initialStreamBufferSize () {
177
- return bufferInitial ;
177
+ public String scheme () {
178
+ return httpsConfig == null ? "http" : "https" ;
178
179
}
179
180
180
181
@ Override
181
- public JexConfig initialStreamBufferSize (int initialSize ) {
182
- bufferInitial = initialSize ;
183
- return this ;
182
+ public HttpServerProvider serverProvider () {
183
+ return this .serverProvider != null ? serverProvider : HttpServerProvider .provider ();
184
184
}
185
185
186
186
@ Override
187
- public JexConfig maxStreamBufferSize ( long maxSize ) {
188
- bufferMax = maxSize ;
187
+ public JexConfig serverProvider ( HttpServerProvider serverProvider ) {
188
+ this . serverProvider = serverProvider ;
189
189
return this ;
190
190
}
191
191
192
192
@ Override
193
- public HttpServerProvider serverProvider () {
194
- return this . serverProvider != null ? serverProvider : HttpServerProvider . provider () ;
193
+ public int socketBacklog () {
194
+ return socketBacklog ;
195
195
}
196
196
197
197
@ Override
198
- public JexConfig serverProvider ( HttpServerProvider serverProvider ) {
199
- this .serverProvider = serverProvider ;
198
+ public JexConfig socketBacklog ( int socketBacklog ) {
199
+ this .socketBacklog = socketBacklog ;
200
200
return this ;
201
201
}
202
202
}
0 commit comments