Package org.jboss.util.property.jmx
Class SystemPropertyClassValue
- java.lang.Object
-
- org.jboss.util.property.jmx.SystemPropertyClassValue
-
- All Implemented Interfaces:
SystemPropertyClassValueMBean
public class SystemPropertyClassValue extends java.lang.Object implements SystemPropertyClassValueMBean
A helper for setting system properties based on class availablity.It has a static method and an MBean wrapper for dynamic configuration.
The class is first checked for availablity before setting the system property.
- Version:
- $Revision$
-
-
Constructor Summary
Constructors Constructor Description SystemPropertyClassValue()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create()
JBoss lifecyclejava.lang.String
getClassName()
The class name to use a value for the system property when it is availablejava.lang.String
getProperty()
The system property valuevoid
setClassName(java.lang.String className)
The class name to use a value for the system property when it is availablevoid
setProperty(java.lang.String property)
The system property valuestatic java.lang.Throwable
setSystemPropertyClassValue(java.lang.String property, java.lang.String className)
Sets the system property to a class when the class is available.
-
-
-
Method Detail
-
getProperty
public java.lang.String getProperty()
The system property value- Specified by:
getProperty
in interfaceSystemPropertyClassValueMBean
- Returns:
- the system property value
-
setProperty
public void setProperty(java.lang.String property)
The system property value- Specified by:
setProperty
in interfaceSystemPropertyClassValueMBean
-
getClassName
public java.lang.String getClassName()
The class name to use a value for the system property when it is available- Specified by:
getClassName
in interfaceSystemPropertyClassValueMBean
- Returns:
- The class name to use a value for the system property when it is available
-
setClassName
public void setClassName(java.lang.String className)
The class name to use a value for the system property when it is available- Specified by:
setClassName
in interfaceSystemPropertyClassValueMBean
-
create
public void create()
JBoss lifecycle- Specified by:
create
in interfaceSystemPropertyClassValueMBean
-
setSystemPropertyClassValue
public static java.lang.Throwable setSystemPropertyClassValue(java.lang.String property, java.lang.String className)
Sets the system property to a class when the class is available.- Parameters:
property
- the property to setclassName
- the class to set as the properties value- Returns:
- any error loading the class
- Throws:
java.lang.IllegalArgumentException
- for a null or empty parameter
-
-