Package com.google.cloud.functions
Interface ExperimentalCloudEventsFunction
-
- 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 ExperimentalCloudEventsFunction
Represents a Cloud Function that is activated by an event and parsed into aCloudEvent
object. Because theCloudEvent
API is not yet stable, a function implemented using this class may not build or work correctly with later versions of that API. Once the API is stable, this interface will becomeCloudEventsFunction
and will also be stable.
-
-
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.
-
-