Class AbstractGoogleHttpFunctionJUnit<J extends AbstractGoogleHttpFunctionJUnit<J>>

java.lang.Object
net.officefloor.server.google.function.wrap.AbstractSetupGoogleHttpFunctionJUnit<J>
net.officefloor.server.google.function.test.AbstractGoogleHttpFunctionJUnit<J>
Direct Known Subclasses:
GoogleHttpFunctionExtension, GoogleHttpFunctionRule

public class AbstractGoogleHttpFunctionJUnit<J extends AbstractGoogleHttpFunctionJUnit<J>> extends AbstractSetupGoogleHttpFunctionJUnit<J>
Abstract Google HttpFunction JUnit functionality.
  • Constructor Details

    • AbstractGoogleHttpFunctionJUnit

      public AbstractGoogleHttpFunctionJUnit(Class<?> httpFunctionClass)
      Instantiate.
      Parameters:
      httpFunctionClass - HttpFunction Class.
    • AbstractGoogleHttpFunctionJUnit

      public AbstractGoogleHttpFunctionJUnit()
      Instantiate using default OfficeFloor HttpFunction.
  • Method Details

    • getHttpServerSocketOfficeFloorExtensionService

      public static OfficeFloorExtensionService getHttpServerSocketOfficeFloorExtensionService(int httpPort, int httpsPort)
      Obtains the OfficeFloorExtensionService to provide HttpServerSocketManagedObjectSource to the HttpFunction.
      Parameters:
      httpPort - HTTP port.
      httpsPort - HTTPS port.
      Returns:
      OfficeFloorExtensionService.
    • httpPort

      public J httpPort(int port)
      Specifies the HTTP port.
      Parameters:
      port - HTTP port.
      Returns:
      this.
    • httpsPort

      public J httpsPort(int port)
      Specifies the HTTPS port.
      Parameters:
      port - HTTPS port.
      Returns:
      this.
    • openHttpServer

      protected void openHttpServer() throws Exception
      Starts the HTTP server for the HttpFunction.
      Throws:
      Exception - If fails to start the HTTP server.