Class DVCCloudClient


  • public final class DVCCloudClient
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​Feature> allFeatures​(User user)
      Get all features for user data
      java.util.Map<java.lang.String,​BaseVariable> allVariables​(User user)
      Get all variables by key for user data
      void track​(User user, Event event)
      Post events to DevCycle for user
      <T> Variable<T> variable​(User user, java.lang.String key, T defaultValue)
      Get variable by key for user data
      <T> T variableValue​(User user, java.lang.String key, T defaultValue)
      Get variable value by key for user data
      • Methods inherited from class java.lang.Object

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

      • DVCCloudClient

        public DVCCloudClient​(java.lang.String sdkKey)
      • DVCCloudClient

        public DVCCloudClient​(java.lang.String sdkKey,
                              DVCCloudOptions options)
    • Method Detail

      • allFeatures

        public java.util.Map<java.lang.String,​Feature> allFeatures​(User user)
                                                                  throws DVCException
        Get all features for user data
        Parameters:
        user - (required)
        Returns:
        Map>String, Feature<
        Throws:
        DVCException
      • variableValue

        public <T> T variableValue​(User user,
                                   java.lang.String key,
                                   T defaultValue)
                            throws DVCException
        Get variable value by key for user data
        Parameters:
        user - (required)
        key - Feature key (required)
        defaultValue - Default value to use if the variable could not be fetched (required)
        Returns:
        Variable value
        Throws:
        DVCException - If there are any uses with the data provided
      • variable

        public <T> Variable<T> variable​(User user,
                                        java.lang.String key,
                                        T defaultValue)
                                 throws DVCException
        Get variable by key for user data
        Parameters:
        user - (required)
        key - Variable key (required)
        defaultValue - Default value to use if the variable could not be fetched (required)
        Returns:
        Variable
        Throws:
        DVCException - If there are any uses with the data provided
      • allVariables

        public java.util.Map<java.lang.String,​BaseVariable> allVariables​(User user)
                                                                        throws DVCException
        Get all variables by key for user data
        Parameters:
        user - (required)
        Returns:
        Map>String, BaseVariable<
        Throws:
        DVCException
      • track

        public void track​(User user,
                          Event event)
                   throws DVCException
        Post events to DevCycle for user
        Parameters:
        user - (required)
        event - (required)
        Throws:
        DVCException