Class SSEClient

  • All Implemented Interfaces:
    io.featurehub.client.edge.EdgeReconnector, io.featurehub.client.EdgeService

    public class SSEClient
    extends java.lang.Object
    implements io.featurehub.client.EdgeService, io.featurehub.client.edge.EdgeReconnector
    • Constructor Summary

      Constructors 
      Constructor Description
      SSEClient​(io.featurehub.client.FeatureStore repository, io.featurehub.client.FeatureHubConfig config, io.featurehub.client.edge.EdgeRetryService retryer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      @NotNull java.util.concurrent.Future<io.featurehub.client.Readyness> contextChange​(java.lang.String newHeader)  
      protected io.featurehub.sse.model.SSEResultState fromValue​(java.lang.String name)  
      @NotNull io.featurehub.client.FeatureHubConfig getConfig()  
      boolean isClientEvaluation()  
      boolean isRequiresReplacementOnHeaderChange()  
      protected okhttp3.sse.EventSource makeEventSource​(okhttp3.Request request, okhttp3.sse.EventSourceListener listener)  
      void poll()  
      void reconnect()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SSEClient

        public SSEClient​(io.featurehub.client.FeatureStore repository,
                         io.featurehub.client.FeatureHubConfig config,
                         io.featurehub.client.edge.EdgeRetryService retryer)
    • Method Detail

      • poll

        public void poll()
        Specified by:
        poll in interface io.featurehub.client.EdgeService
      • fromValue

        protected io.featurehub.sse.model.SSEResultState fromValue​(java.lang.String name)
      • makeEventSource

        protected okhttp3.sse.EventSource makeEventSource​(okhttp3.Request request,
                                                          okhttp3.sse.EventSourceListener listener)
      • contextChange

        @NotNull
        public @NotNull java.util.concurrent.Future<io.featurehub.client.Readyness> contextChange​(java.lang.String newHeader)
        Specified by:
        contextChange in interface io.featurehub.client.EdgeService
      • isClientEvaluation

        public boolean isClientEvaluation()
        Specified by:
        isClientEvaluation in interface io.featurehub.client.EdgeService
      • close

        public void close()
        Specified by:
        close in interface io.featurehub.client.EdgeService
      • getConfig

        @NotNull
        public @NotNull io.featurehub.client.FeatureHubConfig getConfig()
        Specified by:
        getConfig in interface io.featurehub.client.EdgeService
      • isRequiresReplacementOnHeaderChange

        public boolean isRequiresReplacementOnHeaderChange()
        Specified by:
        isRequiresReplacementOnHeaderChange in interface io.featurehub.client.EdgeService
      • reconnect

        public void reconnect()
        Specified by:
        reconnect in interface io.featurehub.client.edge.EdgeReconnector