AttachmentsClassLoader

class AttachmentsClassLoader(attachments: List<Attachment>, val params: NetworkParameters, sampleTxId: SecureHash, isAttachmentTrusted: (Attachment) -> Boolean, parent: ClassLoader = ClassLoader.getSystemClassLoader()) : URLClassLoader

A custom ClassLoader that knows how to load classes from a set of attachments. The attachments themselves only need to provide JAR streams, and so could be fetched from a database, local disk, etc. Constructing an AttachmentsClassLoader is somewhat expensive, as every attachment is scanned to ensure that there are no overlapping file paths. In addition, every JAR is scanned to ensure that it doesn't violate the package namespace ownership rules.

Constructors

Link copied to clipboard
constructor(attachments: List<Attachment>, params: NetworkParameters, sampleTxId: SecureHash, isAttachmentTrusted: (Attachment) -> Boolean, parent: ClassLoader = ClassLoader.getSystemClassLoader())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The network parameters fetched from the transaction for which this classloader was built.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun findResource(p0: String): URL
Link copied to clipboard
open override fun findResources(p0: String): Enumeration<URL>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getResource(p0: String): URL
Link copied to clipboard
open override fun getResourceAsStream(p0: String): InputStream
Link copied to clipboard
Link copied to clipboard
open fun getURLs(): Array<URL>
Link copied to clipboard
open fun loadClass(p0: String): Class<*>
Link copied to clipboard
open fun resources(p0: String): Stream<URL>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard