Skip to content

Commit c65e35b

Browse files
committed
Add javadocs
1 parent cff368f commit c65e35b

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed

src/main/java/io/github/amayaframework/jetty/JettyFactory.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@
55
import org.eclipse.jetty.server.Server;
66

77
/**
8-
*
8+
* An interface describing an abstract jetty {@link Server} factory.
99
*/
1010
public interface JettyFactory {
1111

1212
/**
13-
* @param handler
14-
* @param options
15-
* @return
13+
* Creates a {@link Server} instance with the specified {@link Handler} implementation and {@link OptionSet}.
14+
*
15+
* @param handler the final handler that contains the logic for processing the http request, must be executed last
16+
* @param options the option set containing jetty server options
17+
* @return the {@link Server} instance
1618
*/
1719
Server create(Handler handler, OptionSet options);
1820

1921
/**
20-
* @param handler
21-
* @return
22+
* Creates a {@link Server} instance with the specified {@link Handler} implementation.
23+
*
24+
* @param handler the final handler that contains the logic for processing the http request, must be executed last
25+
* @return the {@link Server} instance
2226
*/
2327
Server create(Handler handler);
2428
}

src/main/java/io/github/amayaframework/jetty/JettyOptions.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
package io.github.amayaframework.jetty;
22

33
/**
4-
*
4+
* A class containing the names of the main server options supported by the {@link JettyServerFactory}.
55
*/
66
public final class JettyOptions {
77
/**
8+
* The name of the server options group.
89
*
10+
* @see io.github.amayaframework.options.GroupOptionSet
911
*/
1012
public static final String GROUP = "jetty";
1113
/**
12-
*
14+
* The name of the listen port option. Required type: {@link Integer}.
1315
*/
1416
public static final String PORT = "port";
1517
/**
16-
*
18+
* The name of the listen ports option. Required type: {@link Iterable} of {@link Integer}.
1719
*/
1820
public static final String PORTS = "ports";
1921
/**
20-
*
22+
* The name of the listen ip option. Required type: {@link java.net.InetSocketAddress}.
2123
*/
2224
public static final String IP = "ip";
2325
/**
24-
*
26+
* The name of the listen ips option. Required type: {@link Iterable} of {@link java.net.InetSocketAddress}.
2527
*/
2628
public static final String IPS = "ips";
2729
/**
28-
*
30+
* The name of the initial http version. Required type: {@link io.github.amayaframework.http.HttpVersion}.
2931
*/
3032
public static final String HTTP_VERSION = "http_version";
3133
/**
32-
*
34+
* The name of the flag determines whether the server will support http sessions. Required type: {@link Boolean}.
3335
*/
3436
public static final String ENABLE_SESSIONS = "enable_sessions";
3537

src/main/java/io/github/amayaframework/jetty/JettyServerFactory.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,36 @@
1515
import java.util.function.Supplier;
1616

1717
/**
18-
*
18+
* A class that implements {@link HttpServerFactory}. Creates an implementations of {@link HttpServer}
19+
* based on jetty {@link Server}.
1920
*/
2021
public final class JettyServerFactory implements HttpServerFactory {
2122
private final JettyFactory factory;
2223
private final Supplier<ThreadPool> supplier;
2324

2425
/**
25-
* @param factory
26+
* Constructs a {@link JettyServerFactory} instance with the given {@link JettyFactory}.
27+
*
28+
* @param factory the specified factory that will be used to create the {@link Server} instance
2629
*/
2730
public JettyServerFactory(JettyFactory factory) {
2831
this.factory = factory;
2932
this.supplier = null;
3033
}
3134

3235
/**
33-
* @param supplier
36+
* Constructs a {@link JettyServerFactory} instance with the given supplier of {@link ThreadPool}.
37+
*
38+
* @param supplier the specified supplier provides {@link ThreadPool} instance
3439
*/
3540
public JettyServerFactory(Supplier<ThreadPool> supplier) {
3641
this.factory = null;
3742
this.supplier = supplier;
3843
}
3944

4045
/**
41-
*
46+
* Constructs a {@link JettyServerFactory} instance which will use the default settings
47+
* ({@link org.eclipse.jetty.util.thread.QueuedThreadPool} and {@link Server} with sessions support).
4248
*/
4349
public JettyServerFactory() {
4450
this.factory = null;

0 commit comments

Comments
 (0)