Package net.sourceforge.jnlp.runtime
Interface JNLPClassLoader.SecurityDelegate
- All Known Implementing Classes:
JNLPClassLoader.SecurityDelegateImpl
- Enclosing class:
- JNLPClassLoader
public static interface JNLPClassLoader.SecurityDelegate
SecurityDelegate, in real usage, relies on having a "parent"
JNLPClassLoader instance. However, JNLPClassLoaders are very large,
heavyweight, difficult-to-mock objects, which means that unit testing on
anything that uses a SecurityDelegate can become very difficult. For
example, JarCertVerifier is designed separated from the ClassLoader so it
can be tested in isolation. However, JCV needs some sort of access back
to JNLPClassLoader instances to be able to invoke setRunInSandbox(). The
SecurityDelegate handles this, allowing JCV to be tested without
instantiating JNLPClassLoaders, by creating a fake SecurityDelegate that
does not require one.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPermission(Permission perm) voidvoidaddPermissions(Collection<Permission> perms) getClassLoaderSecurity(URL codebaseHost) getCodebaseSecurityDesc(JARDesc jarDesc, URL codebaseHost) getJarPermissions(URL codebaseHost) booleanbooleanvoidvoidbooleanboolean
-
Method Details
-
isPluginApplet
boolean isPluginApplet() -
userPromptedForPartialSigning
boolean userPromptedForPartialSigning() -
userPromptedForSandbox
boolean userPromptedForSandbox() -
getCodebaseSecurityDesc
-
getClassLoaderSecurity
- Throws:
LaunchException
-
getJarPermissions
-
promptUserOnPartialSigning
- Throws:
LaunchException
-
setRunInSandbox
- Throws:
LaunchException
-
getRunInSandbox
boolean getRunInSandbox() -
addPermission
-
addPermissions
-
addPermissions
-