public class SecurityFactory extends Object
SecurityManager
and locating of security properties file by name.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SECURITY_DIRECTORY |
static String |
DEFAULT_SECURITY_RESOURCE |
Constructor and Description |
---|
SecurityFactory() |
Modifier and Type | Method and Description |
---|---|
static SecurityManager |
createSecurityManager(Properties securityProperties)
Creates a
SecurityManager instance using the provided security properties. |
static InputStream |
findSecurityProperties(String resourceName)
Finds the security properties file based on the resource name.
|
static Properties |
loadSecurityProperties(String resourceName)
Loads the specified properties file from the resource. see
findSecurityProperties(String) . |
public static final String DEFAULT_SECURITY_RESOURCE
public static final String DEFAULT_SECURITY_DIRECTORY
public static SecurityManager createSecurityManager(Properties securityProperties)
SecurityManager
instance using the provided security properties. The
property key SecurityManager.SECURITY_MANAGER_CLASS_PROPERTY_KEY
identifies the class
name to use to load the security manager implementation.securityProperties
- The security properties to use to create the security manager and
underlying components.SecurityException
- if failed to create the security manager.public static Properties loadSecurityProperties(String resourceName)
findSecurityProperties(String)
. If no resource is found, a SecurityException
is thrown.
The properties file is used to configure the different security components.
resourceName
- The full resource name. If null
loads the default.SecurityException
- if any exception was thrown while trying to load the resource, or
if the resource could not be located.public static InputStream findSecurityProperties(String resourceName)
null
.resourceName
- The full resource name. If null
loads the default.null
if no resource was found.Copyright © GigaSpaces.