Skip to content

Commit

Permalink
Moved config-related information into RouteConfig, ServerConfig, and …
Browse files Browse the repository at this point in the history
…SocketConfig classes. Changed Kickstart app to utilize new bind(int) method that accepts the port number.
  • Loading branch information
tfredrich committed Jun 4, 2012
1 parent cfafb39 commit c03d455
Show file tree
Hide file tree
Showing 6 changed files with 326 additions and 95 deletions.
3 changes: 1 addition & 2 deletions examples/kickstart/src/java/com/kickstart/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public static void main(String[] args) throws Exception
Configuration config = loadEnvironment(args);
RestExpress server = new RestExpress(new Routes(config))
.setName(config.getName())
.setPort(config.getPort())
.setDefaultFormat(config.getDefaultFormat())
.putResponseProcessor(Format.JSON, ResponseProcessors.json())
.putResponseProcessor(Format.XML, ResponseProcessors.xml())
Expand All @@ -43,7 +42,7 @@ public static void main(String[] args) throws Exception
.register(server);

mapExceptions(server);
server.bind();
server.bind(config.getPort());
server.awaitShutdown();
}

Expand Down
Loading

0 comments on commit c03d455

Please sign in to comment.