Package io.micronaut.gcp.function.http
Class HttpFunction
- java.lang.Object
 - 
- io.micronaut.function.executor.AbstractExecutor
 - 
- io.micronaut.function.executor.FunctionInitializer
 - 
- io.micronaut.gcp.function.http.HttpFunction
 
 
 
 
- 
- All Implemented Interfaces:
 com.google.cloud.functions.HttpFunction,io.micronaut.context.ApplicationContextProvider,java.io.Closeable,java.lang.AutoCloseable
public class HttpFunction extends io.micronaut.function.executor.FunctionInitializer implements com.google.cloud.functions.HttpFunctionEntry point into the Micronaut + GCP integration.- Since:
 - 1.2.0
 - Author:
 - graemerocher
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerLOG 
- 
Constructor Summary
Constructors Constructor Description HttpFunction()Default constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GoogleHttpResponseinvoke(com.google.cloud.functions.HttpRequest request)Invoke the function directly with the given request object.GoogleHttpResponseinvoke(io.micronaut.http.HttpMethod method, java.lang.String uri)Invoke the function directly with the given request object.GoogleHttpResponseinvoke(io.micronaut.http.HttpMethod method, java.lang.String uri, java.lang.Object body)Invoke the function directly with the given request object.GoogleHttpResponseinvoke(io.micronaut.http.HttpRequest<?> request)Invoke the function directly with the given request object.protected io.micronaut.context.ApplicationContextBuildernewApplicationContextBuilder()voidservice(com.google.cloud.functions.HttpRequest request, com.google.cloud.functions.HttpResponse response)protected voidstartThis(io.micronaut.context.ApplicationContext applicationContext)- 
Methods inherited from class io.micronaut.function.executor.FunctionInitializer
close, injectThis, run 
 - 
 
 - 
 
- 
- 
Method Detail
- 
startThis
protected void startThis(io.micronaut.context.ApplicationContext applicationContext)
- Overrides:
 startThisin classio.micronaut.function.executor.FunctionInitializer
 
- 
newApplicationContextBuilder
@Nonnull protected io.micronaut.context.ApplicationContextBuilder newApplicationContextBuilder()
- Overrides:
 newApplicationContextBuilderin classio.micronaut.function.executor.AbstractExecutor
 
- 
service
public void service(com.google.cloud.functions.HttpRequest request, com.google.cloud.functions.HttpResponse response) throws java.lang.Exception- Specified by:
 servicein interfacecom.google.cloud.functions.HttpFunction- Throws:
 java.lang.Exception
 
- 
invoke
public GoogleHttpResponse invoke(com.google.cloud.functions.HttpRequest request)
Invoke the function directly with the given request object.- Parameters:
 request- The request object- Returns:
 - The response object
 
 
- 
invoke
public GoogleHttpResponse invoke(io.micronaut.http.HttpMethod method, java.lang.String uri)
Invoke the function directly with the given request object.- Parameters:
 method- The methoduri- The URI- Returns:
 - The response object
 
 
- 
invoke
public GoogleHttpResponse invoke(io.micronaut.http.HttpMethod method, java.lang.String uri, java.lang.Object body)
Invoke the function directly with the given request object.- Parameters:
 method- The methoduri- The URIbody- The body- Returns:
 - The response object
 
 
- 
invoke
public GoogleHttpResponse invoke(io.micronaut.http.HttpRequest<?> request)
Invoke the function directly with the given request object.- Parameters:
 request- The request object- Returns:
 - The response object
 
 
 - 
 
 -