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

SystemPropertiesServiceMBean (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档


org.jboss.varia.property
Interface SystemPropertiesServiceMBean

All Superinterfaces:
org.jboss.system.Service, org.jboss.system.ServiceMBean
All Known Implementing Classes:
SystemPropertiesService

public interface SystemPropertiesServiceMBean
extends org.jboss.system.ServiceMBean

MBean interface.


Field Summary
static javax.management.ObjectName OBJECT_NAME
           
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Method Summary
 void addListener(org.jboss.util.property.PropertyListener listener)
          Add a property listener.
 void addListener(String typename)
          Construct and add a property listener.
 void addListeners(org.jboss.util.property.PropertyListener[] listeners)
          Add an array of property listeners.
 boolean exists(String name)
          Check if a system property of the given name exists.
 String get(String name)
          Get a system property.
 String get(String name, String defaultValue)
          Get a system property.
 List getArray(String name)
          Get an array style system property.
 List getArray(String base, List defaultValues)
          Get an array style system property.
 org.jboss.util.property.PropertyGroup getGroup(String basename)
          Get a property group for under the given system property base.
 org.jboss.util.property.PropertyGroup getGroup(String basename, int index)
          Get a property group for under the given system property base at the given index.
 void load(String url)
          Load some system properties from the given URL.
 void load(URL url)
          Load some system properties from the given URL.
 String remove(String name)
          Remove a system property.
 boolean removeListener(org.jboss.util.property.PropertyListener listener)
          Remove a property listener.
 String set(String name, String value)
          Set a system property.
 void setProperties(Properties props)
          Set system properties by merging the given properties object.
 void setURLList(String list)
          Load system properties for each of the given comma separated urls.
 Map showAll()
          Return a Map of System.getProperties() with a toString implementation that provides an html table of the key/value pairs.
 Map showGroup(String basename)
          Return a Map of the property group for under the given system property base with a toString implementation that provides an html table of the key/value pairs.
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

OBJECT_NAME

public static final javax.management.ObjectName OBJECT_NAME
Method Detail

set

public String set(String name,
                  String value)
Set a system property.

Parameters:
name - The name of the property to set.
value - The value of the property.
Returns:
Previous property value or null

get

public String get(String name,
                  String defaultValue)
Get a system property.

Parameters:
name - Property name
defaultValue - Default property value
Returns:
Property value or default

get

public String get(String name)
Get a system property.

Parameters:
name - Property name
Returns:
Property value or null

remove

public String remove(String name)
Remove a system property.

Parameters:
name - The name of the property to remove.
Returns:
Removed property value or null

getArray

public List getArray(String base,
                     List defaultValues)
Get an array style system property.

Parameters:
base - Base property name
defaultValues - Default property values
Returns:
ArrayList of property values or default

getArray

public List getArray(String name)
Get an array style system property.

Parameters:
name - Property name
Returns:
ArrayList of property values or empty array

exists

public boolean exists(String name)
Check if a system property of the given name exists.

Parameters:
name - Property name
Returns:
True if property exists

getGroup

public org.jboss.util.property.PropertyGroup getGroup(String basename)
Get a property group for under the given system property base.

Parameters:
basename - Base property name
Returns:
Property group

getGroup

public org.jboss.util.property.PropertyGroup getGroup(String basename,
                                                      int index)
Get a property group for under the given system property base at the given index.

Parameters:
basename - Base property name
index - Array property index
Returns:
Property group

addListener

public void addListener(org.jboss.util.property.PropertyListener listener)
Add a property listener.

Parameters:
listener - Property listener to add

addListeners

public void addListeners(org.jboss.util.property.PropertyListener[] listeners)
Add an array of property listeners.

Parameters:
listeners - Array of property listeners to add

removeListener

public boolean removeListener(org.jboss.util.property.PropertyListener listener)
Remove a property listener.

Parameters:
listener - Property listener to remove
Returns:
True if listener was removed

load

public void load(URL url)
          throws IOException
Load some system properties from the given URL.

Parameters:
url - The url to load properties from.
Throws:
IOException

load

public void load(String url)
          throws IOException,
                 MalformedURLException
Load some system properties from the given URL.

Parameters:
url - The url to load properties from.
Throws:
IOException
MalformedURLException

addListener

public void addListener(String typename)
                 throws ClassNotFoundException,
                        IllegalAccessException,
                        InstantiationException
Construct and add a property listener.

Throws:
ClassNotFoundException
IllegalAccessException
InstantiationException

setURLList

public void setURLList(String list)
                throws MalformedURLException,
                       IOException
Load system properties for each of the given comma separated urls.

Parameters:
list - A list of comma separated urls.
Throws:
MalformedURLException
IOException

setProperties

public void setProperties(Properties props)
                   throws IOException
Set system properties by merging the given properties object. This will replace valid references to properties of the form ${x} in 'props' or a System property with the value of x.

Parameters:
props - Properties object to merge.
Throws:
IOException

showAll

public Map showAll()
Return a Map of System.getProperties() with a toString implementation that provides an html table of the key/value pairs.


showGroup

public Map showGroup(String basename)
Return a Map of the property group for under the given system property base with a toString implementation that provides an html table of the key/value pairs.

Parameters:
basename - Base property name
Returns:
Property group


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