Package nxt.addons
Class CloudDataClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
nxt.addons.CloudDataClassLoader
Load a contract and all its classes from data retrieved from the blockchain.
The protection domain represents the permissions granted to the contract by aggregating permissions from the policy file in the following order
1. All default permissions provided by Java
2. Permissions from the "file://untrustedContractCode" codebase
3. Permissions from the "file://untrustedContractCode" codebase where signedBy is set to the public key of the account which uploaded the
contract to the blockchain
4. Permissions from the "file://untrustedContractCode" codebase where principal is set to
TransactionPrincipal followed
by the transaction hash (full hash or tagged data hash or hash of the contract data)-
Constructor Summary
ConstructorsConstructorDescriptionCloudDataClassLoader(Map<String, byte[]> classFileData, CodeSigner[] codeSigners, Principal[] principals) -
Method Summary
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass, getPermissionsMethods 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, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
CloudDataClassLoader
public CloudDataClassLoader(Map<String, byte[]> classFileData, CodeSigner[] codeSigners, Principal[] principals)
-
-
Method Details
-
findClass
- Overrides:
findClassin classClassLoader- Throws:
ClassNotFoundException
-
loadClass
- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-