Module org.mule.sdk.api
Interface ArtifactDisposalContext
Provides context information about the disposal of the Artifact enclosing the Extension.
NOTE: Experimental feature. Backwards compatibility not guaranteed.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisArtifactOwnedClassLoader(ClassLoader classLoader) booleanisArtifactOwnedThread(Thread thread) booleanisExtensionOwnedClassLoader(ClassLoader classLoader) booleanisExtensionOwnedThread(Thread thread)
-
Method Details
-
getExtensionClassLoader
ClassLoader getExtensionClassLoader()- Returns:
- the
ClassLoaderfor the extension that defines theArtifactLifecycleListenerbeing executed
-
getArtifactClassLoader
ClassLoader getArtifactClassLoader()- Returns:
- the
ClassLoaderfor the enclosing artifact that's being disposed, most typically an app or domain
-
isExtensionOwnedClassLoader
- Parameters:
classLoader- a classloader- Returns:
- whether the given
classLoaderis owned by the extension that defines theArtifactLifecycleListenerbeing executed.
-
isArtifactOwnedClassLoader
- Parameters:
classLoader- a classloader- Returns:
- whether the given
classLoaderis owned by the enclosing artifact that is being disposed, most typically an app or domain
-
getExtensionOwnedThreads
Returns aStreamwith thethreadsthat were CREATED by the extension.By "created" we refer to Threads that were actually explicitly instantiated by this extension or one of its libraries.
This DOES NOT include threads that served tasks submitted through the
SchedulerService, since those threads actually belong to the Mule Runtime. For those, you still need to dispose theschedulersas specified in their API. -
getArtifactOwnedThreads
Returns aStreamwith thethreadsthat were CREATED by the enclosing artifact that is being disposed.By "created" we refer to Threads that were actually explicitly instantiated by the enclosing artifact or one of its libraries.
This DOES NOT include threads that served tasks submitted through the
SchedulerService, since those threads actually belong to the Mule Runtime. For those, you still need to dispose theschedulersas specified in their API. -
isArtifactOwnedThread
- Parameters:
thread- aThread- Returns:
- whether the given
threadis owned by the enclosing artifact. This will follow the same criteria described ingetArtifactOwnedThreads(). - See Also:
-
isExtensionOwnedThread
- Parameters:
thread- aThread- Returns:
- whether the given
threadis owned by either the extension that defines theArtifactLifecycleListenerbeing executed. This will follow the same criteria described ingetExtensionOwnedThreads(). - See Also:
-