Skip to content

Commit

Permalink
Add more parameters. Bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
noboomu committed Oct 9, 2018
1 parent d06d3e2 commit 6732586
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.sinistral</groupId>
<artifactId>proteus-core</artifactId>
<version>0.3.3-SNAPSHOT</version>
<version>0.3.4-SNAPSHOT</version>
<name>proteus core</name>
<description>Proteus is an extremely light, fast, and flexible Java REST API framework built atop Undertow.</description>
<url>http://github.com/noboomu/proteus</url>
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/io/sinistral/proteus/ProteusApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@
import io.sinistral.proteus.server.handlers.ServerDefaultHttpHandler;
import io.sinistral.proteus.utilities.SecurityOps;
import io.sinistral.proteus.utilities.TablePrinter;
import io.undertow.Handlers;
import io.undertow.Undertow;
import io.undertow.Undertow.ListenerInfo;
import io.undertow.UndertowOptions;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
import io.undertow.server.RoutingHandler;
import io.undertow.server.protocol.http2.Http2UpgradeHandler;
import io.undertow.util.Headers;
import io.undertow.util.Methods;

Expand Down Expand Up @@ -250,7 +252,7 @@ public void buildServer()

this.addDefaultRoutes(router);

final HttpHandler handler;
HttpHandler handler;

if (rootHandlerClass != null)
{
Expand All @@ -267,7 +269,7 @@ public void buildServer()
{
httpPort = Integer.parseInt(System.getProperty("http.port"));
}

Undertow.Builder undertowBuilder = Undertow.builder().addHttpListener(httpPort, config.getString("application.host"))
.setBufferSize(16 * 1024)
.setIoThreads(Runtime.getRuntime().availableProcessors() * 2)
Expand All @@ -277,6 +279,7 @@ public void buildServer()
.setServerOption(UndertowOptions.ALWAYS_SET_KEEP_ALIVE, config.getBoolean("undertow.server.alwaysSetKeepAlive"))
.setServerOption(UndertowOptions.RECORD_REQUEST_START_TIME, config.getBoolean("undertow.server.recordRequestStartTime"))
.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, config.getBytes("undertow.server.maxEntitySize"))
.setSocketOption(org.xnio.Options.REUSE_ADDRESSES, config.getBoolean("undertow.socket.reuseAddresses"))
.setWorkerThreads(config.getInt("undertow.workerThreads"))
.setHandler(handler);

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ undertow

socket {
backlog = 10000
reuseAddresses = true
}


Expand Down
8 changes: 1 addition & 7 deletions src/test/java/io/sinistral/proteus/test/models/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ public void setId(Long id)
this.id = id;
}

// /**
// * @return the type
// */
// public UserType getType()
// {
// return type;
// }


/**
* @param type the type to set
Expand Down

0 comments on commit 6732586

Please sign in to comment.