Class ContextFactory
java.lang.Object
com.mirth.connect.server.userutil.ContextFactory
Allows the user to retrieve information about the current JavaScript context.
-
Constructor Summary
ConstructorsConstructorDescriptionContextFactory(com.mirth.connect.server.util.javascript.MirthContextFactory delegate) Instantiates a new ContextFactory object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the application classloader that the current JavaScript context is using.Returns a classloader containing only the libraries contained in the custom resources, with no parent classloader.Returns the set of custom resource IDs that the current JavaScript context is using.
-
Constructor Details
-
ContextFactory
public ContextFactory(com.mirth.connect.server.util.javascript.MirthContextFactory delegate) Instantiates a new ContextFactory object.- Parameters:
delegate- The underlying ContextFactory this class will delegate to.
-
-
Method Details
-
getResourceIds
Returns the set of custom resource IDs that the current JavaScript context is using. If no custom libraries are being used in the current JavaScript context, this will return an empty set.- Returns:
- The set of custom resource IDs that the current JavaScript context is using.
-
getClassLoader
Returns the application classloader that the current JavaScript context is using.- Returns:
- The application classloader that the current JavaScript context is using.
-
getIsolatedClassLoader
Returns a classloader containing only the libraries contained in the custom resources, with no parent classloader. If no custom libraries are being used in the current JavaScript context, this will return null.- Returns:
- A classloader containing only the libraries contained in the custom resources, with no parent classloader.
-