com.r3corda.node.internal.testing / MockNetwork / MockNode

MockNode

class MockNode : AbstractNode


Constructors

<init> MockNode(dir: Path, config: NodeConfiguration, mockNet: MockNetwork, networkMapAddr: NodeInfo?, advertisedServices: Set<ServiceType>, id: Int, keyPair: KeyPair?)

Properties

id val id: Int
keyPair val keyPair: KeyPair?
log open val log: <ERROR CLASS>
mockNet val mockNet: MockNetwork
place val place: PhysicalLocation
serverThread open val serverThread: AffinityExecutor

Inherited Properties

_servicesThatAcceptUploads val _servicesThatAcceptUploads: ArrayList<AcceptsFileUpload>
advertisedServices val advertisedServices: Set<ServiceType>
api lateinit var api: APIServer
checkpointStorage lateinit var checkpointStorage: CheckpointStorage
configuration val configuration: NodeConfiguration
customServices val customServices: ArrayList<Any>
dir val dir: Path
identity lateinit var identity: IdentityService
inNodeNetworkMapService var inNodeNetworkMapService: NetworkMapService?
inNodeNotaryService var inNodeNotaryService: NotaryService?
info val info: NodeInfo
isPreviousCheckpointsPresent var isPreviousCheckpointsPresent: Boolean
keyManagement lateinit var keyManagement: E2ETestKeyManagementService
net lateinit var net: MessagingServiceInternal
netMapCache lateinit var netMapCache: NetworkMapCache
networkMapRegistrationFuture val networkMapRegistrationFuture: <ERROR CLASS><Unit>
networkMapSeq var networkMapSeq: Long

Sequence number of changes sent to the network map service, when registering/de-registering this node.

networkMapService val networkMapService: NodeInfo?
platformClock val platformClock: Clock
pluginRegistries val pluginRegistries: List<CordaPluginRegistry>

Fetch CordaPluginRegistry classes registered in META-INF/services/com.r3corda.core.node.CordaPluginRegistry files that exist in the classpath

protocolLogicFactory lateinit var protocolLogicFactory: ProtocolLogicRefFactory
scheduler lateinit var scheduler: SchedulerService
services val services: ServiceHubInternal
servicesThatAcceptUploads val servicesThatAcceptUploads: List<AcceptsFileUpload>
smm lateinit var smm: StateMachineManager
started var started: Boolean

Set to true once start has been successfully called.

storage lateinit var storage: TxWritableStorageService
wallet lateinit var wallet: WalletService

Functions

findMyLocation open fun findMyLocation(): PhysicalLocation?
generateKeyPair open fun generateKeyPair(): KeyPair
makeIdentityService open fun makeIdentityService(): MockIdentityService
makeMessagingService open fun makeMessagingService(): MessagingServiceInternal
noNetworkMapConfigured open fun noNetworkMapConfigured(): <ERROR CLASS>

This is overriden by the mock node implementation to enable operation without any network map service

start open fun start(): MockNode
startMessagingService open fun startMessagingService(): Unit

Inherited Functions

constructStorageService open fun constructStorageService(attachments: NodeAttachmentService, transactionStorage: TransactionStorage, keypair: KeyPair, identity: Party): StorageServiceImpl
createNodeDir fun createNodeDir(): Unit
findService fun <T : Any> findService(): <ERROR CLASS>

Locates and returns a service of the given type if loaded, or throws an exception if not found.

initialiseStorageService open fun initialiseStorageService(dir: Path): <ERROR CLASS><TxWritableStorageService, CheckpointStorage>
makeAttachmentStorage fun makeAttachmentStorage(dir: Path): NodeAttachmentService
makeNetworkMapService open fun makeNetworkMapService(): Unit
makeNotaryService open fun makeNotaryService(type: ServiceType): Unit
setup open fun setup(): AbstractNode

Run any tasks that are needed to ensure the node is in a correct state before running start().

stop open fun stop(): Unit

Inheritors

SimulatedNode open class SimulatedNode : MockNode