corda / net.corda.core.cordapp / Cordapp

Cordapp

@DoNotImplement interface Cordapp

Represents a cordapp by registering the JAR that contains it and all important classes for Corda. Instances of this class are generated automatically at startup of a node and can get retrieved from CordappProvider.getAppContext from the CordappContext it returns.

This will only need to be constructed manually for certain kinds of tests.

Types

Info

interface Info

Further information about the CorDapp extracted from its MANIFEST. The sub-types Default, Contract and Workflow determine what type of CorDapp this is.

Properties

allFlows

abstract val allFlows: List<Class<out FlowLogic<*>>>

List of all flow classes

checkpointCustomSerializers

abstract val checkpointCustomSerializers: List<CheckpointCustomSerializer<*, *>>

List of serializers for checkpoints

contractClassNames

abstract val contractClassNames: List<String>

List of contracts

cordappClasses

abstract val cordappClasses: List<String>

An exhaustive list of all classes relevant to the node within this CorDapp

customSchemas

abstract val customSchemas: Set<MappedSchema>

List of custom schemas

info

abstract val info: Info

initiatedFlows

abstract val initiatedFlows: List<Class<out FlowLogic<*>>>

List of initiatable flow classes

jarHash

abstract val jarHash: SHA256

Hash of the jar

jarPath

abstract val jarPath: URL

The path to the JAR for this CorDapp

minimumPlatformVersion

abstract val minimumPlatformVersion: Int

The minimum platform version this CorDapp will run on.

name

abstract val name: String

Cordapp name - derived from the base name of the Cordapp JAR (therefore may not be unique). This is different to Cordapp.Info.shortName which should be used instead.

rpcFlows

abstract val rpcFlows: List<Class<out FlowLogic<*>>>

List of RPC initiable flows classes

schedulableFlows

abstract val schedulableFlows: List<Class<out FlowLogic<*>>>

List of flows startable by the scheduler

serializationCustomSerializers

abstract val serializationCustomSerializers: List<SerializationCustomSerializer<*, *>>

List of serializers

serializationWhitelists

abstract val serializationWhitelists: List<SerializationWhitelist>

List of Corda plugin registries

serviceFlows

abstract val serviceFlows: List<Class<out FlowLogic<*>>>

List of net.corda.core.node.services.CordaService initiable flows classes

services

abstract val services: List<Class<out SerializeAsToken>>

List of RPC services

targetPlatformVersion

abstract val targetPlatformVersion: Int

The target platform version this CorDapp was designed and tested on.

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

When called from a companion object, returns the logger for the enclosing class.