Package co.paralleluniverse.actors
Class ActorLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- co.paralleluniverse.actors.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 modulesjavax.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 URLvoid
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 URLvoid
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
-
-
-
-
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)
-
getLoadedModules
public java.util.List<java.lang.String> getLoadedModules()
Description copied from interface:ActorLoaderMXBean
All currently loaded modules- Specified by:
getLoadedModules
in interfaceActorLoaderMXBean
-
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 interfaceActorLoaderMXBean
- 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 interfaceActorLoaderMXBean
- 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 classjava.lang.ClassLoader
- Throws:
java.lang.ClassNotFoundException
-
getResource
public java.net.URL getResource(java.lang.String name)
- Overrides:
getResource
in classjava.lang.ClassLoader
-
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo
in interfacejavax.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 interfacejavax.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 interfacejavax.management.NotificationEmitter
- Throws:
javax.management.ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Throws:
javax.management.ListenerNotFoundException
-
-