Interface PluginProvider.EventSubscriberFacet<E extends Event>

All Known Subinterfaces:
DatastoreTypeProvider.DatastoreEventFacet, GenericIntegrationProvider.EventSubscriberFacet<E>
Enclosing interface:
PluginProvider

public static interface PluginProvider.EventSubscriberFacet<E extends Event>
Applying this Facet to an integration will allow it to subscribe to events and perform operations based on the event
Since:
1.2.6
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<IEventScope>
    Gets the list of scopes to limit the events received by the subscriber.
    Gets a list of supported event types that this integration can subscribe to
    void
    onEvent(E event, AccountIntegration integration)
    Method triggered when an event that was subscribed to is triggered.
  • Method Details

    • getSupportedEventTypes

      List<EventType> getSupportedEventTypes()
      Gets a list of supported event types that this integration can subscribe to
      Returns:
      list of supported event types
    • getEventScopes

      default List<IEventScope> getEventScopes()
      Gets the list of scopes to limit the events received by the subscriber. This is useful for filtering events based on the associations of the event subject. For example, an integration may only want to receive events when the subject has an association to a cloud. When combined with event types, a provider could subscribe to only create network on a cloud events.
      Returns:
      list of event scopes
    • onEvent

      void onEvent(E event, AccountIntegration integration)
      Method triggered when an event that was subscribed to is triggered. This is useful for capturing hooks like perhaps, an action needs to be performed after a network is created or destroyed.
      Parameters:
      event - the event object that was triggered
      See Also: