站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

SystemPropertyClassValue (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.property.jmx
Class SystemPropertyClassValue

java.lang.Object
  extended byorg.jboss.util.property.jmx.SystemPropertyClassValue
All Implemented Interfaces:
SystemPropertyClassValueMBean

public class SystemPropertyClassValue
extends 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: 1.4 $
Author:
Adrian Brock

Field Summary
protected  String className
          Class Name.
static Logger log
           
protected  String property
          Property name.
 
Constructor Summary
SystemPropertyClassValue()
          Constructor.
 
Method Summary
 void create()
          JBoss lifecycle
 String getClassName()
          The class name to use a value for the system property when it is available
 String getProperty()
          The system property value
 void setClassName(String className)
          The class name to use a value for the system property when it is available
 void setProperty(String property)
          The system property value
static Throwable setSystemPropertyClassValue(String property, 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 log

property

protected String property
Property name.


className

protected String className
Class Name.

Constructor Detail

SystemPropertyClassValue

public SystemPropertyClassValue()
Constructor.

Method Detail

getProperty

public String getProperty()
The system property value

Specified by:
getProperty in interface SystemPropertyClassValueMBean

setProperty

public void setProperty(String property)
The system property value

Specified by:
setProperty in interface SystemPropertyClassValueMBean

getClassName

public String getClassName()
The class name to use a value for the system property when it is available

Specified by:
getClassName in interface SystemPropertyClassValueMBean

setClassName

public void setClassName(String className)
The class name to use a value for the system property when it is available

Specified by:
setClassName in interface SystemPropertyClassValueMBean

create

public void create()
JBoss lifecycle

Specified by:
create in interface SystemPropertyClassValueMBean

setSystemPropertyClassValue

public static Throwable setSystemPropertyClassValue(String property,
                                                    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:
IllegalArgumentException - for a null or empty parameter


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.