Class CracHttpServer

java.lang.Object
cloud.piranha.http.crac.CracHttpServer
All Implemented Interfaces:
HttpServer, org.crac.Resource

public class CracHttpServer extends Object implements HttpServer, org.crac.Resource
The CRaC integration for the HttpServer API.
  • Constructor Details

    • CracHttpServer

      public CracHttpServer(HttpServer delegate)
      Constructor.
      Parameters:
      delegate - the delegate.
  • Method Details

    • afterRestore

      public void afterRestore(org.crac.Context<? extends org.crac.Resource> context) throws Exception
      Specified by:
      afterRestore in interface org.crac.Resource
      Throws:
      Exception
    • beforeCheckpoint

      public void beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context) throws Exception
      Specified by:
      beforeCheckpoint in interface org.crac.Resource
      Throws:
      Exception
    • getHttpServerProcessor

      public HttpServerProcessor getHttpServerProcessor()
      Description copied from interface: HttpServer
      Returns the http server processor.
      Specified by:
      getHttpServerProcessor in interface HttpServer
      Returns:
      the http server processor
    • getSSL

      public boolean getSSL()
      Description copied from interface: HttpServer
      Get the SSL flag
      Specified by:
      getSSL in interface HttpServer
      Returns:
      the server port
    • getServerPort

      public int getServerPort()
      Description copied from interface: HttpServer
      Returns the server port.
      Specified by:
      getServerPort in interface HttpServer
      Returns:
      the server port
    • isRunning

      public boolean isRunning()
      Description copied from interface: HttpServer
      Check if the server is running.
      Specified by:
      isRunning in interface HttpServer
      Returns:
      true if it is, false otherwise.
    • setHttpServerProcessor

      public void setHttpServerProcessor(HttpServerProcessor httpServerProcessor)
      Description copied from interface: HttpServer
      Set the http server processor
      Specified by:
      setHttpServerProcessor in interface HttpServer
      Parameters:
      httpServerProcessor - the http server processor
    • setSSL

      public void setSSL(boolean ssl)
      Description copied from interface: HttpServer
      Set the SSL flag
      Specified by:
      setSSL in interface HttpServer
      Parameters:
      ssl - the SSL flag
    • setServerPort

      public void setServerPort(int serverPort)
      Description copied from interface: HttpServer
      Set the server port
      Specified by:
      setServerPort in interface HttpServer
      Parameters:
      serverPort - the port
    • start

      public void start()
      Description copied from interface: HttpServer
      Start the server.
      Specified by:
      start in interface HttpServer
    • stop

      public void stop()
      Description copied from interface: HttpServer
      Stop the server.
      Specified by:
      stop in interface HttpServer