Class ActorLoader

  • All Implemented Interfaces:
    ActorLoaderMXBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter

    public class ActorLoader
    extends java.lang.ClassLoader
    implements ActorLoaderMXBean, javax.management.NotificationEmitter
    Loads actor, and actor-related classes for hot code-swapping.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addNotificationListener​(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)  
      static <T> java.lang.Class<T> currentClassFor​(java.lang.Class<T> clazz)  
      static java.lang.Class<?> currentClassFor​(java.lang.String className)  
      protected java.lang.Class<?> findClass​(java.lang.String name)  
      java.util.List<java.lang.String> getLoadedModules()
      All currently loaded modules
      javax.management.MBeanNotificationInfo[] getNotificationInfo()  
      static <T> T getReplacementFor​(T object)  
      java.net.URL getResource​(java.lang.String name)  
      void loadModule​(java.lang.String jarURL)  
      void loadModule​(java.net.URL jarURL)  
      void reloadModule​(java.lang.String jarURL)
      Loads or reloads the module at the given URL
      void reloadModule​(java.net.URL jarURL)  
      void removeNotificationListener​(javax.management.NotificationListener listener)  
      void removeNotificationListener​(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)  
      void unloadModule​(java.lang.String jarURL)
      Unloads the module at the given URL
      void unloadModule​(java.net.URL jarURL)  
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • currentClassFor

        public static <T> java.lang.Class<T> currentClassFor​(java.lang.Class<T> clazz)
      • currentClassFor

        public static java.lang.Class<?> currentClassFor​(java.lang.String className)
                                                  throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • getReplacementFor

        public static <T> T getReplacementFor​(T object)
      • reloadModule

        public void reloadModule​(java.lang.String jarURL)
        Description copied from interface: ActorLoaderMXBean
        Loads or reloads the module at the given URL
        Specified by:
        reloadModule in interface ActorLoaderMXBean
        Parameters:
        jarURL - the URL of the JAR file containing the module
      • loadModule

        public void loadModule​(java.lang.String jarURL)
      • unloadModule

        public void unloadModule​(java.lang.String jarURL)
        Description copied from interface: ActorLoaderMXBean
        Unloads the module at the given URL
        Specified by:
        unloadModule in interface ActorLoaderMXBean
        Parameters:
        jarURL - the URL of the JAR file containing the module
      • reloadModule

        public void reloadModule​(java.net.URL jarURL)
      • loadModule

        public void loadModule​(java.net.URL jarURL)
      • unloadModule

        public void unloadModule​(java.net.URL jarURL)
      • findClass

        protected java.lang.Class<?> findClass​(java.lang.String name)
                                        throws java.lang.ClassNotFoundException
        Overrides:
        findClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • getResource

        public java.net.URL getResource​(java.lang.String name)
        Overrides:
        getResource in class java.lang.ClassLoader
      • getNotificationInfo

        public javax.management.MBeanNotificationInfo[] getNotificationInfo()
        Specified by:
        getNotificationInfo in interface javax.management.NotificationBroadcaster
      • addNotificationListener

        public void addNotificationListener​(javax.management.NotificationListener listener,
                                            javax.management.NotificationFilter filter,
                                            java.lang.Object handback)
                                     throws java.lang.IllegalArgumentException
        Specified by:
        addNotificationListener in interface javax.management.NotificationBroadcaster
        Throws:
        java.lang.IllegalArgumentException
      • removeNotificationListener

        public void removeNotificationListener​(javax.management.NotificationListener listener,
                                               javax.management.NotificationFilter filter,
                                               java.lang.Object handback)
                                        throws javax.management.ListenerNotFoundException
        Specified by:
        removeNotificationListener in interface javax.management.NotificationEmitter
        Throws:
        javax.management.ListenerNotFoundException
      • removeNotificationListener

        public void removeNotificationListener​(javax.management.NotificationListener listener)
                                        throws javax.management.ListenerNotFoundException
        Specified by:
        removeNotificationListener in interface javax.management.NotificationBroadcaster
        Throws:
        javax.management.ListenerNotFoundException