org.jboss.util.property.jmx
Class SystemPropertyClassValue

java.lang.Object
  extended byorg.jboss.util.property.jmx.SystemPropertyClassValue

public class SystemPropertyClassValue
extends java.lang.Object

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.


Field Summary
protected  java.lang.String className
          Class Name.
static Logger (src) log
           
protected  java.lang.String property
          Property name.
 
Constructor Summary
SystemPropertyClassValue()
          Constructor.
 
Method Summary
 void create()
          JBoss lifecycle
 java.lang.String getClassName()
          The class name to use a value for the system property when it is available
 java.lang.String getProperty()
          The system property value
 void setClassName(java.lang.String className)
          The class name to use a value for the system property when it is available
 void setProperty(java.lang.String property)
          The system property value
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final Logger (src)  log

property

protected java.lang.String property
Property name.


className

protected java.lang.String className
Class Name.

Constructor Detail

SystemPropertyClassValue

public SystemPropertyClassValue()
Constructor.

Method Detail

getProperty

public java.lang.String getProperty()
The system property value


setProperty

public void setProperty(java.lang.String property)
The system property value


getClassName

public java.lang.String getClassName()
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


create

public void create()
JBoss lifecycle


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 set
className - the class to set as the properties value
Returns:
any error loading the class
Throws:
java.lang.IllegalArgumentException - for a null or empty parameter