All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.launchdarkly.sdk.server.FeatureRequestor Maven / Gradle / Ivy

There is a newer version: 7.5.0
Show newest version
package com.launchdarkly.sdk.server;

import com.launchdarkly.sdk.server.interfaces.DataStoreTypes.FullDataSet;
import com.launchdarkly.sdk.server.interfaces.DataStoreTypes.ItemDescriptor;

import java.io.Closeable;
import java.io.IOException;

/**
 * Internal abstraction for polling requests. Currently this is only used by PollingProcessor, and
 * the only implementation is DefaultFeatureRequestor, but using an interface allows us to mock out
 * the HTTP behavior and test the rest of PollingProcessor separately.
 */
interface FeatureRequestor extends Closeable {
  /**
   * Makes a request to the LaunchDarkly server-side SDK polling endpoint,
   * 
   * @param returnDataEvenIfCached true if the method should return non-nil data no matter what;
   *   false if it should return {@code null} when the latest data is already in the cache
   * @return the data, or {@code null} as above
   * @throws IOException for network errors
   * @throws HttpErrorException for HTTP error responses
   */
  FullDataSet getAllData(boolean returnDataEvenIfCached) throws IOException, HttpErrorException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy