|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.SecurityManager
matlabcontrol.PermissiveSecurityManager
public class PermissiveSecurityManager
A SecurityManager
that always permits an action to take place. By default a Java application has no
SecurityManager
set (although Java applets do). This security manager acts as if there was no security
manager in place. matlabcontrol uses Remote Method Invocation (RMI) to communicate with MATLAB when it is used in an
application that is not running inside MATLAB. RMI requires a security manager be set in order to allow loading
classes that are defined in the other Java Virtual Machine, but not its own. This is for good reason, because
allowing arbitrary code to be loaded into an application has the potential for a security exploit. By default RMI
allows connections from any external machine unless otherwise configured (or blocked by a firewall). matlabcontrol
is configured to prohibit any external connections on the port it is using.
When matlabcontrol launches a session of MATLAB it installs this security manager so that MATLAB may load classes
defined in your application. matlabcontrol does not install this security manager in your program. Installing any
security manager will allow your application to receive objects from MATLAB that are of classes defined in MATLAB,
but not in your application. Using this security manager is convenient when your application does not need any
security beyond the default of having no security manager installed.
To install this security manager:
System.setSecurityManager(new PermissiveSecurityManager());
Field Summary |
---|
Fields inherited from class java.lang.SecurityManager |
---|
inCheck |
Constructor Summary | |
---|---|
PermissiveSecurityManager()
|
Method Summary | |
---|---|
void |
checkPermission(java.security.Permission perm)
Always accepts permission request. |
void |
checkPermission(java.security.Permission perm,
java.lang.Object context)
Always accepts permission request. |
Methods inherited from class java.lang.SecurityManager |
---|
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissiveSecurityManager()
Method Detail |
---|
public void checkPermission(java.security.Permission perm)
checkPermission
in class java.lang.SecurityManager
perm
- public void checkPermission(java.security.Permission perm, java.lang.Object context)
checkPermission
in class java.lang.SecurityManager
perm
- context
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |