Class ClassLoaderPolicy

java.lang.Object
i5.las2peer.classLoaders.policies.ClassLoaderPolicy
Direct Known Subclasses:
DefaultPolicy, RestrictivePolicy

public abstract class ClassLoaderPolicy extends Object
An abstract policy to define restrictions to Java packages and classes. Only whitelisted packages / classes (and their subpackages) can be loaded. If the empty package is whitelisted, all classes can be loaded. Blacklisted paths and their subpaths are never allowed. Blacklisting has priority over whitelisting. Note that the security manager needs to be enabled and deny access to the system class loader in order to make this to work!
  • Constructor Details

    • ClassLoaderPolicy

      public ClassLoaderPolicy()
  • Method Details

    • allow

      protected void allow(String path)
    • deny

      protected void deny(String path)
    • canLoad

      public boolean canLoad(String className)