Package opencard.core.util
Class SystemAccess
- java.lang.Object
-
- opencard.core.util.SystemAccess
-
public class SystemAccess extends java.lang.Object
Singleton that provides access to protected system resources like file I/O, properties, native code. Thread safe: each thread can only access its own SystemAccess class.
This is the default SystemAccess class used by OpenCard. To run OpenCard under a browser install the browser specific SystemAccess class in the applets init() method as follows:
opencard.core.util.SystemAccess sys = opencard.opt.vendorX.VendorXSystemAccess(); opencard.core.util.SystemAccess.setSystemAccess(sys);- Author:
- Peter Bendel (peter_bendel@de.bm.com)
- See Also:
opencard.opt.ms.MicrosoftSystemAccess
,opencard.opt.netscape.NetscapeSystemAccess
-
-
Constructor Summary
Constructors Constructor Description SystemAccess()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBoolean(java.lang.String key)
Access system propertiesjava.util.Properties
getProperties()
Access system propertiesjava.lang.String
getProperty(java.lang.String key)
Access system propertiesjava.lang.String
getProperty(java.lang.String key, java.lang.String def)
Access system propertiesstatic SystemAccess
getSystemAccess()
Return the instance of SystemAccess associated with the current thread.void
loadLibrary(java.lang.String libName)
Link to a native DLL.java.util.Properties
loadProperties(java.lang.String filename)
Access system propertiesstatic void
setSystemAccess(SystemAccess newSystemAccess)
Set the SystemAccess instance for the current thread.
-
-
-
Method Detail
-
getBoolean
public boolean getBoolean(java.lang.String key)
Access system properties
-
getProperties
public java.util.Properties getProperties()
Access system properties
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Access system properties
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String def)
Access system properties
-
getSystemAccess
public static SystemAccess getSystemAccess()
Return the instance of SystemAccess associated with the current thread. If the current thread has not set its own SystemAccess instance return the default system access instance.
-
loadLibrary
public void loadLibrary(java.lang.String libName)
Link to a native DLL.
-
loadProperties
public java.util.Properties loadProperties(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
Access system properties- Throws:
java.io.FileNotFoundException
java.io.IOException
-
setSystemAccess
public static void setSystemAccess(SystemAccess newSystemAccess)
Set the SystemAccess instance for the current thread. This allows a thread to set a browser specific object that requests privileges from the browser VM by using proprietary mechanisms (e.g. netscape.security.PrivilegeManager.enablePrivilege() )
-
-