public class HttpFunction
extends io.micronaut.function.executor.FunctionInitializer
implements com.google.cloud.functions.HttpFunction
Modifier and Type | Field and Description |
---|---|
protected io.micronaut.context.ApplicationContext |
applicationContext |
protected static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
HttpFunction()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected io.micronaut.context.ApplicationContext |
buildApplicationContext(C arg0) |
GoogleHttpResponse |
invoke(io.micronaut.http.HttpMethod method,
java.lang.String uri)
Invoke the function directly with the given request object.
|
GoogleHttpResponse |
invoke(io.micronaut.http.HttpMethod method,
java.lang.String uri,
java.lang.Object body)
Invoke the function directly with the given request object.
|
GoogleHttpResponse |
invoke(com.google.cloud.functions.HttpRequest request)
Invoke the function directly with the given request object.
|
GoogleHttpResponse |
invoke(io.micronaut.http.HttpRequest<?> request)
Invoke the function directly with the given request object.
|
protected io.micronaut.context.ApplicationContextBuilder |
newApplicationContextBuilder() |
protected io.micronaut.inject.ExecutableMethod<java.lang.Object,java.lang.Object> |
resolveFunction(io.micronaut.function.LocalFunctionRegistry arg0,
java.lang.String arg1) |
protected java.lang.String |
resolveFunctionName(io.micronaut.context.env.Environment arg0) |
void |
service(com.google.cloud.functions.HttpRequest request,
com.google.cloud.functions.HttpResponse response) |
protected io.micronaut.context.env.Environment |
startEnvironment(io.micronaut.context.ApplicationContext arg0) |
protected void |
startThis(io.micronaut.context.ApplicationContext applicationContext) |
protected static final org.slf4j.Logger LOG
protected io.micronaut.context.ApplicationContext applicationContext
protected void startThis(io.micronaut.context.ApplicationContext applicationContext)
startThis
in class io.micronaut.function.executor.FunctionInitializer
@Nonnull protected io.micronaut.context.ApplicationContextBuilder newApplicationContextBuilder()
public void service(com.google.cloud.functions.HttpRequest request, com.google.cloud.functions.HttpResponse response) throws java.lang.Exception
service
in interface com.google.cloud.functions.HttpFunction
java.lang.Exception
public GoogleHttpResponse invoke(com.google.cloud.functions.HttpRequest request)
request
- The request objectpublic GoogleHttpResponse invoke(io.micronaut.http.HttpMethod method, java.lang.String uri)
method
- The methoduri
- The URIpublic GoogleHttpResponse invoke(io.micronaut.http.HttpMethod method, java.lang.String uri, java.lang.Object body)
method
- The methoduri
- The URIbody
- The bodypublic GoogleHttpResponse invoke(io.micronaut.http.HttpRequest<?> request)
request
- The request objectprotected io.micronaut.inject.ExecutableMethod<java.lang.Object,java.lang.Object> resolveFunction(io.micronaut.function.LocalFunctionRegistry arg0, java.lang.String arg1)
protected java.lang.String resolveFunctionName(io.micronaut.context.env.Environment arg0)
protected io.micronaut.context.ApplicationContext buildApplicationContext(@Nullable C arg0)
protected io.micronaut.context.env.Environment startEnvironment(io.micronaut.context.ApplicationContext arg0)