Interface SecurityDelegate
-
- All Known Implementing Classes:
SecurityDelegateImpl
public interface SecurityDelegateSecurityDelegate, 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPermissions(java.util.Collection<java.security.Permission> perms)SecurityDescgetClassLoaderSecurity(java.net.URL codebaseHost)SecurityDescgetCodebaseSecurityDesc(JARDesc jarDesc, java.net.URL codebaseHost)SecurityDescgetJarPermissions(java.net.URL codebaseHost)booleangetRunInSandbox()voidpromptUserOnPartialSigning()voidsetRunInSandbox()
-
-
-
Method Detail
-
getCodebaseSecurityDesc
SecurityDesc getCodebaseSecurityDesc(JARDesc jarDesc, java.net.URL codebaseHost)
-
getClassLoaderSecurity
SecurityDesc getClassLoaderSecurity(java.net.URL codebaseHost) throws LaunchException
- Throws:
LaunchException
-
getJarPermissions
SecurityDesc getJarPermissions(java.net.URL codebaseHost)
-
promptUserOnPartialSigning
void promptUserOnPartialSigning() throws LaunchException- Throws:
LaunchException
-
setRunInSandbox
void setRunInSandbox() throws LaunchException- Throws:
LaunchException
-
getRunInSandbox
boolean getRunInSandbox()
-
addPermissions
void addPermissions(java.util.Collection<java.security.Permission> perms)
-
-