io.deepsense.neptune.clientlibrary.config.user.EnvironmentUserConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-client-library Show documentation
Show all versions of neptune-client-library Show documentation
Enables integration with Neptune in your Java code
/**
* Copyright (c) 2016, CodiLime Inc.
*/
package io.deepsense.neptune.clientlibrary.config.user;
import com.google.common.base.Preconditions;
import java.util.Map;
public class EnvironmentUserConfiguration extends StaticUserConfiguration {
public static final String USERNAME_ENVIRONMENT_VARIABLE_NAME = "NEPTUNE_USER";
public static final String PASSWORD_ENVIRONMENT_VARIABLE_NAME = "NEPTUNE_PASSWORD";
public EnvironmentUserConfiguration(Map environment) {
super(Preconditions.checkNotNull(environment).get(USERNAME_ENVIRONMENT_VARIABLE_NAME),
Preconditions.checkNotNull(environment).get(PASSWORD_ENVIRONMENT_VARIABLE_NAME));
}
public EnvironmentUserConfiguration() {
this(System.getenv());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy