Package com.google.cloud.functions
Interface CloudEventsFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CloudEventsFunction
Represents a Cloud Function that is activated by an event and parsed into a
CloudEvent object.-
Method Summary
Modifier and Type Method Description voidaccept(io.cloudevents.CloudEvent event)Called to service an incoming event.
-
Method Details
-
accept
Called to service an incoming event. This interface is implemented by user code to provide the action for a given background function. If this method throws any exception (including anyError) then the HTTP response will have a 500 status code.- Parameters:
event- the event.- Throws:
java.lang.Exception- to produce a 500 status code in the HTTP response.
-