Interface SourceHandlerProvider<T>

Type Parameters:
T - event type
All Known Implementing Classes:
SseSourceHandlerProvider

public interface SourceHandlerProvider<T>
ServiceLoader provider interface for Source handlers.
  • Method Details

    • supports

      boolean supports(GenericType<? extends Source<?>> type, HttpClientResponse response)
      Checks if a provider supports the type.
      Parameters:
      type - the source type
      response - the HTTP response
      Returns:
      outcome of test
    • handle

      <X extends Source<T>> void handle(X source, HttpClientResponse response, MediaContext mediaContext)
      Handles a source.
      Type Parameters:
      X - type of source
      Parameters:
      source - the source
      response - the HTTP response
      mediaContext - the media context