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 Summary
ConstructorsConstructorDescriptionInstantiate using defaultOfficeFloorHttpFunction.AbstractGoogleHttpFunctionJUnit(Class<?> httpFunctionClass) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionstatic OfficeFloorExtensionServicegetHttpServerSocketOfficeFloorExtensionService(int httpPort, int httpsPort) Obtains theOfficeFloorExtensionServiceto provideHttpServerSocketManagedObjectSourceto theHttpFunction.httpPort(int port) Specifies the HTTP port.httpsPort(int port) Specifies the HTTPS port.protected voidStarts the HTTP server for theHttpFunction.Methods inherited from class net.officefloor.server.google.function.wrap.AbstractSetupGoogleHttpFunctionJUnit
getHttpFunctionOfficeExtension, office, officeFloor, setupHttpFunction, teardownHttpFunction
-
Constructor Details
-
AbstractGoogleHttpFunctionJUnit
Instantiate.- Parameters:
httpFunctionClass-HttpFunctionClass.
-
AbstractGoogleHttpFunctionJUnit
public AbstractGoogleHttpFunctionJUnit()Instantiate using defaultOfficeFloorHttpFunction.
-
-
Method Details
-
getHttpServerSocketOfficeFloorExtensionService
public static OfficeFloorExtensionService getHttpServerSocketOfficeFloorExtensionService(int httpPort, int httpsPort) Obtains theOfficeFloorExtensionServiceto provideHttpServerSocketManagedObjectSourceto theHttpFunction.- Parameters:
httpPort- HTTP port.httpsPort- HTTPS port.- Returns:
OfficeFloorExtensionService.
-
httpPort
Specifies the HTTP port.- Parameters:
port- HTTP port.- Returns:
this.
-
httpsPort
Specifies the HTTPS port.- Parameters:
port- HTTPS port.- Returns:
this.
-
openHttpServer
Starts the HTTP server for theHttpFunction.- Throws:
Exception- If fails to start the HTTP server.
-