Created
July 31, 2014 10:18
-
-
Save scobal/ab8de8abc75bdfbe9082 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class KriegerHttpServer { | |
| public static final String BASE_URI = "http://localhost:8080/krieger-web/"; | |
| private static HttpServer SERVER; | |
| public static synchronized void stopServer() { | |
| SERVER.stop(); | |
| SERVER = null; | |
| } | |
| public static synchronized void startServer() throws IOException { | |
| if (SERVER == null) { | |
| SERVER = GrizzlyServerFactory.createHttpServer(URI.create(BASE_URI))); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment