org.apache.yoko.rmispec.util
Class GetSystemPropertyAction

java.lang.Object
  extended by org.apache.yoko.rmispec.util.GetSystemPropertyAction
All Implemented Interfaces:
PrivilegedAction

public class GetSystemPropertyAction
extends Object
implements PrivilegedAction

Simple utility class for retrieving a system property value using the AccessController.


Constructor Summary
GetSystemPropertyAction(String name)
          Retrive a value using the name with no default value.
GetSystemPropertyAction(String name, String defaultValue)
          Retrieve a property using a name and a specified default value.
 
Method Summary
 Object run()
          Perform the AccessController action of retrieving the system property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetSystemPropertyAction

public GetSystemPropertyAction(String name)
Retrive a value using the name with no default value.

Parameters:
name - The property name.

GetSystemPropertyAction

public GetSystemPropertyAction(String name,
                               String defaultValue)
Retrieve a property using a name and a specified default value.

Parameters:
name - The property name.
defaultValue - The default value if the property has not been set.
Method Detail

run

public Object run()
Perform the AccessController action of retrieving the system property.

Specified by:
run in interface PrivilegedAction
Returns:
The retrieved property. Returns either null or the specified default value if this has not been set.


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.