Save This Page
Home » JBoss-5.1.0 » org.jboss.varia » property » [javadoc | source]
org.jboss.varia.property
public class: SystemPropertiesService [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.varia.property.SystemPropertiesService

All Implemented Interfaces:
    SystemPropertiesServiceMBean, KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

A service to access system properties.
Nested Class Summary:
protected static class  SystemPropertiesService.HTMLMap  A helper to render a map as HTML on toString()

The html adapter should in theory be able to render a map (nested map list, array or whatever), but until then we can do it for it. 

Field Summary
protected  String serverHome    The server's home dir as a string (for making urls). 
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Method from org.jboss.varia.property.SystemPropertiesService Summary:
addListener,   addListener,   addListeners,   exists,   get,   get,   getArray,   getArray,   getGroup,   getGroup,   load,   load,   preRegister,   remove,   removeListener,   set,   setProperties,   setURLList,   showAll,   showGroup
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.varia.property.SystemPropertiesService Detail:
 public  void addListener(PropertyListener listener) 
    Add a property listener.
 public  void addListener(String typename) throws ClassNotFoundException, IllegalAccessException, InstantiationException 
    Construct and add a property listener.
 public  void addListeners(PropertyListener[] listeners) 
    Add an array of property listeners.
 public boolean exists(String name) 
    Check if a system property of the given name exists.
 public String get(String name) 
    Get a system property.
 public String get(String name,
    String defaultValue) 
    Get a system property.
 public List getArray(String name) 
    Get an array style system property.
 public List getArray(String base,
    List defaultValues) 
    Get an array style system property.
 public PropertyGroup getGroup(String basename) 
    Get a property group for under the given system property base.
 public PropertyGroup getGroup(String basename,
    int index) 
    Get a property group for under the given system property base at the given index.
 public  void load(URL url) throws IOException 
    Load some system properties from the given URL.
 public  void load(String url) throws IOException, MalformedURLException 
    Load some system properties from the given URL.
 public ObjectName preRegister(MBeanServer server,
    ObjectName name) throws Exception 
    Setup our reference to the server's home directory. This is done here because one or more attribute setters makes use of this value.
 public String remove(String name) 
    Remove a system property.
 public boolean removeListener(PropertyListener listener) 
    Remove a property listener.
 public String set(String name,
    String value) 
    Set a system property.
 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.
 public  void setURLList(String list) throws MalformedURLException, IOException 
    Load system properties for each of the given comma separated urls.
 public Map showAll() 
    Return a Map of System.getProperties() with a toString implementation that provides an html table of the key/value pairs.
 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.