public class CordappContext
An app context provides information about where an app was loaded from, access to its classloader,
and (in the included interface Cordapp
object) lists of annotated classes discovered via scanning the JAR.
A CordappContext is obtained from CordappProvider.getAppContext
which resides on a ServiceHub. This will be
used primarily from within flows.
interface Cordapp
,
CordappProvider.getAppContext
,
ServiceHubModifier and Type | Class and Description |
---|---|
static class |
CordappContext.Companion |
Modifier and Type | Field and Description |
---|---|
static CordappContext.Companion |
Companion |
Constructor and Description |
---|
CordappContext(Cordapp cordapp,
SecureHash attachmentId,
java.lang.ClassLoader classLoader)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
SecureHash |
getAttachmentId()
For CorDapps containing
|
java.lang.ClassLoader |
getClassLoader()
the classloader used to load this cordapp
|
CordappConfig |
getConfig()
Configuration for this CorDapp
|
Cordapp |
getCordapp()
The cordapp this context is about
|
public static CordappContext.Companion Companion
public CordappContext(Cordapp cordapp, SecureHash attachmentId, java.lang.ClassLoader classLoader)
public Cordapp getCordapp()
The cordapp this context is about
public SecureHash getAttachmentId()
For CorDapps containing
Contract or UpgradedContract implementations this will be populatedwith the attachment containing those class files
public java.lang.ClassLoader getClassLoader()
the classloader used to load this cordapp
's classes
public CordappConfig getConfig()
Configuration for this CorDapp