Skip to content

Commit

Permalink
reworked some comments/javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
calebpower committed Feb 26, 2020
1 parent 45f20c9 commit 6f36d9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import edu.uco.cs.group3_spring2020.kwic.domain.pipes.KWICPipe;

/**
* Demonstration of a stand-alone web application that utilizes a JSON-based
* configuration file, the SparkJava microframework, a custom console prompter,
* the FreeMarker template engine, and JUnit testing.
* Engine to index user-provided lines using KWIC* method.
*
* @author Caleb L. Power
*/
Expand All @@ -29,11 +27,12 @@ public static void main(String[] args) {
kwicPipe = new KWICPipe();

System.out.println("Launching front end...");
frontEnd = new FrontEnd(UI_PORT, kwicPipe); //configure the front end
(new Thread(frontEnd)).start(); //run the front end in a different thread
frontEnd = new FrontEnd(UI_PORT, kwicPipe); // configure the front end
(new Thread(frontEnd)).start(); // run the front end in a different thread

System.out.println("Ready!");

// catch CTRL + C
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override public void run() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
/**
* FreeMarker engine for hypertext transformations.
*
* @author Alex
* @author Per Wendel
* @author Caleb L. Power
*/
public class FreeMarkerEngine extends TemplateEngine {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public class FrontEnd implements Runnable {
private static final String RESPONDER_STATIC_FOLDER = "responder/static";
private static final String RESPONDER_TEMPLATE_FOLDER = "/responder/templates";

private int port; //the port that the front end should run on
private FreeMarkerEngine freeMarkerEngine = null; //the FreeMarker engine
private Endpoint endpoints[] = null; //the pages that will be accessible
private int port; // the port that the front end should run on
private FreeMarkerEngine freeMarkerEngine = null; // the FreeMarker engine
private Endpoint endpoints[] = null; // the pages that will be accessible

/**
* Opens the specified external port so as to launch the front end.
Expand All @@ -46,7 +46,7 @@ public FrontEnd(int port, PostContentHook postContentHook) {
new POSTContentEndpoint(postContentHook)
};

staticFiles.location(RESPONDER_STATIC_FOLDER); //relative to the root of the classpath
staticFiles.location(RESPONDER_STATIC_FOLDER); // relative to the root of the classpath
}

/**
Expand Down Expand Up @@ -74,7 +74,7 @@ public FrontEnd(int port, PostContentHook postContentHook) {
return "OK";
});

for(Endpoint endpoint : endpoints) { //iterate through initialized pages and determine the appropriate HTTP request types
for(Endpoint endpoint : endpoints) { // iterate through initialized pages and determine the appropriate HTTP request types
for(HTTPMethod method : endpoint.getHTTPMethods()) {
switch(method) {
case DELETE:
Expand Down

0 comments on commit 6f36d9a

Please sign in to comment.