public final class EnvironmentPropertyValue extends java.lang.Object implements Value<java.lang.String>, java.security.PrivilegedAction<java.lang.String>
System.getenv(String)| Constructor and Description |
|---|
EnvironmentPropertyValue(java.lang.String propertyName)
Construct a new instance.
|
EnvironmentPropertyValue(java.lang.String propertyName,
java.security.AccessControlContext accessControlContext)
Construct a new instance.
|
EnvironmentPropertyValue(java.lang.String propertyName,
java.security.AccessControlContext accessControlContext,
Value<?> defaultValue)
Construct a new instance.
|
EnvironmentPropertyValue(java.lang.String propertyName,
Value<?> defaultValue)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getValue()
Get the actual value.
|
java.lang.String |
run()
Fetch the property in an unprivileged context.
|
public EnvironmentPropertyValue(java.lang.String propertyName)
propertyName - the property name to readpublic EnvironmentPropertyValue(java.lang.String propertyName,
java.security.AccessControlContext accessControlContext)
propertyName - the property name to readaccessControlContext - the access control context in which to fetch the property valuepublic EnvironmentPropertyValue(java.lang.String propertyName,
Value<?> defaultValue)
propertyName - the property name to readdefaultValue - the value to use if the property is unsetpublic EnvironmentPropertyValue(java.lang.String propertyName,
java.security.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 java.lang.String getValue()
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
public java.lang.String run()
run in interface java.security.PrivilegedAction<java.lang.String>Copyright © 2012 JBoss, a division of Red Hat, Inc.