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 aCloudEvent
object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(io.cloudevents.CloudEvent event)
Called to service an incoming event.
-
-
-
Method Detail
-
accept
void accept(io.cloudevents.CloudEvent event) throws java.lang.Exception
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.
-
-