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

      Creates an eventsub subscription for this conduit.
      Parameters:
      subscription - the eventsub subscription to be registered
      Returns:
      the created subscription
      API Note:
      An exception is thrown if the subscription could not be created. Prefer register(SubscriptionType, Function) if your code does not inspect the specific exception.
    • register

      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.
      API Note:
      No exception is thrown if helix rejects the registration request
    • 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
      Implementation Note:
      This method only considers the subset of shards that are managed by this object.