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 |
loadComponentSecurityProperties(String component,
boolean useMinusDLast)
Load a component's security properties file.
|
static Properties |
loadSecurityProperties(String resourceName)
Loads the specified properties file from the resource.
|
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 Properties loadComponentSecurityProperties(String component, boolean useMinusDLast)
component - The component name, e.g. "grid"useMinusDLast - if -Dcom.gs.security.properties-file is set, use it after looking up default component fileSecurityException - if couldn't locate/load security filepublic static InputStream findSecurityProperties(String resourceName)
null.resourceName - The full resource name. If null loads the default.null if no resource was found.Copyright © GigaSpaces.