Example #1
0
 @Override
 public void start() {
   if (httpServer == null) {
     try {
       httpServer = HttpServer.create(new InetSocketAddress(configuredPort), 10);
       runtimePort = httpServer.getAddress().getPort();
     } catch (IOException e) {
       throw new RuntimeException(e);
     }
   }
   context.bind(httpServer);
   httpServer.start();
 }
Example #2
0
 @Override
 public void stop() {
   runtimePort = -1;
   httpServer.stop(0);
   context.cleanup();
 }
Example #3
0
 public ResteasyDeployment getDeployment() {
   return context.getDeployment();
 }
Example #4
0
 public void setRootResourcePath(String rootResourcePath) {
   context.setPath(rootResourcePath);
 }