ServiceBuilder.requires(org.jboss.msc.service.ServiceName)
method instead. This class will be removed in a future release.@Deprecated public final class EnvironmentPropertyValue extends Object implements Value<String>, PrivilegedAction<String>
System.getenv(String)
Constructor and Description |
---|
EnvironmentPropertyValue(String propertyName)
Deprecated.
Construct a new instance.
|
EnvironmentPropertyValue(String propertyName,
AccessControlContext accessControlContext)
Deprecated.
Construct a new instance.
|
EnvironmentPropertyValue(String propertyName,
AccessControlContext accessControlContext,
Value<?> defaultValue)
Deprecated.
Construct a new instance.
|
EnvironmentPropertyValue(String propertyName,
Value<?> defaultValue)
Deprecated.
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getValue()
Deprecated.
Get the actual dependency value.
|
String |
run()
Deprecated.
Fetch the property in an unprivileged context.
|
public EnvironmentPropertyValue(String propertyName)
propertyName
- the property name to readpublic EnvironmentPropertyValue(String propertyName, AccessControlContext accessControlContext)
propertyName
- the property name to readaccessControlContext
- the access control context in which to fetch the property valuepublic EnvironmentPropertyValue(String propertyName, Value<?> defaultValue)
propertyName
- the property name to readdefaultValue
- the value to use if the property is unsetpublic EnvironmentPropertyValue(String propertyName, AccessControlContext accessControlContext, Value<?> defaultValue)
propertyName
- the property name to readaccessControlContext
- the access control context in which to fetch the property valuedefaultValue
- the value to use if the property is unsetpublic String getValue() throws IllegalStateException, IllegalArgumentException
getValue
in interface Value<String>
IllegalStateException
- if the value is time-sensitive and the current state does not allow retrieval.IllegalArgumentException
- when the value cannot be read due to misconfigurationpublic String run()
run
in interface PrivilegedAction<String>
Copyright © 2021 JBoss by Red Hat. All rights reserved.