matlabcontrol
Class PermissiveSecurityManager

java.lang.Object
  extended by java.lang.SecurityManager
      extended by matlabcontrol.PermissiveSecurityManager

public class PermissiveSecurityManager
extends java.lang.SecurityManager

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());
 
 

Since:
4.0.0

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

PermissiveSecurityManager

public PermissiveSecurityManager()
Method Detail

checkPermission

public void checkPermission(java.security.Permission perm)
Always accepts permission request.

Overrides:
checkPermission in class java.lang.SecurityManager
Parameters:
perm -

checkPermission

public void checkPermission(java.security.Permission perm,
                            java.lang.Object context)
Always accepts permission request.

Overrides:
checkPermission in class java.lang.SecurityManager
Parameters:
perm -
context -