Package org.jboss.msc.value
Class SystemPropertyValue
- java.lang.Object
-
- org.jboss.msc.value.SystemPropertyValue
-
- All Implemented Interfaces:
PrivilegedAction<String>
,Value<String>
@Deprecated public final class SystemPropertyValue extends Object implements Value<String>, PrivilegedAction<String>
Deprecated.UseServiceBuilder.requires(org.jboss.msc.service.ServiceName)
method instead. This class will be removed in a future release.A value which comes from a system property.- Author:
- David M. Lloyd
- See Also:
System.getProperty(String)
-
-
Constructor Summary
Constructors Constructor Description SystemPropertyValue(String propertyName)
Deprecated.Construct a new instance.SystemPropertyValue(String propertyName, AccessControlContext accessControlContext)
Deprecated.Construct a new instance.SystemPropertyValue(String propertyName, AccessControlContext accessControlContext, Value<?> defaultValue)
Deprecated.Construct a new instance.SystemPropertyValue(String propertyName, Value<?> defaultValue)
Deprecated.Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getValue()
Deprecated.Get the actual dependency value.String
run()
Deprecated.Fetch the property in an unprivileged context.
-
-
-
Constructor Detail
-
SystemPropertyValue
public SystemPropertyValue(String propertyName)
Deprecated.Construct a new instance.- Parameters:
propertyName
- the property name to read
-
SystemPropertyValue
public SystemPropertyValue(String propertyName, AccessControlContext accessControlContext)
Deprecated.Construct a new instance.- Parameters:
propertyName
- the property name to readaccessControlContext
- the access control context in which to fetch the property value
-
SystemPropertyValue
public SystemPropertyValue(String propertyName, Value<?> defaultValue)
Deprecated.Construct a new instance.- Parameters:
propertyName
- the property name to readdefaultValue
- the value to use if the property is unset
-
SystemPropertyValue
public SystemPropertyValue(String propertyName, AccessControlContext accessControlContext, Value<?> defaultValue)
Deprecated.Construct a new instance.- Parameters:
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 unset
-
-
Method Detail
-
getValue
public String getValue() throws IllegalStateException, IllegalArgumentException
Deprecated.Get the actual dependency value.- Specified by:
getValue
in interfaceValue<String>
- Returns:
- the actual dependency value
- Throws:
IllegalStateException
- if the value is time-sensitive and the current state does not allow retrieval.IllegalArgumentException
- when the value cannot be read due to misconfiguration
-
run
public String run()
Deprecated.Fetch the property in an unprivileged context.- Specified by:
run
in interfacePrivilegedAction<String>
- Returns:
- the property value
-
-