Interface IEventSubConduit

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
TwitchConduitSocketPool

public interface IEventSubConduit extends AutoCloseable
  • Method Details

    • getConduitId

      String getConduitId()
      Returns:
      the ID associated with this Conduit
    • getEventManager

      com.github.philippheuer.events4j.api.IEventManager getEventManager()
      Returns:
      the event manager for eventsub notifications
    • register

      EventSubSubscription register(@NotNull @NotNull EventSubSubscription subscription)
      Creates an eventsub subscription for this conduit.
      Parameters:
      subscription - the eventsub subscription to be registered
      Returns:
      the created subscription
    • register

      <C extends EventSubCondition, B> Optional<EventSubSubscription> register(@NotNull @NotNull SubscriptionType<C,B,?> type, @NotNull @NotNull Function<B,C> conditions)
      Creates an eventsub subscription for this conduit.
      Type Parameters:
      C - the condition type associated with the subscription
      B - the builder type associated with the condition
      Parameters:
      type - the type of EventSub subscription to be created; see SubscriptionTypes
      conditions - the conditions associated with the eventsub subscription
      Returns:
      the created subscription, or empty if the subscription could not be registered.
    • unregister

      boolean unregister(@NotNull @NotNull EventSubSubscription subscription)
      Deletes an eventsub subscription from helix (and this conduit).
      Parameters:
      subscription - the eventsub subscription to be destroyed
      Returns:
      whether the specified subscription was successfully deleted
    • getLatency

      long getLatency()
      Returns:
      the average latency for the socket shards in milliseconds, or -1 if unknown