core.node / Node

Node

class Node : AbstractNode

A Node manages a standalone server that takes part in the P2P network. It creates the services found in ServiceHub, loads important data off disk and starts listening for connections.

Parameters

dir - A Path to a location on disk where working files can be found or stored.

p2pAddr - The host and port that this server will use. It cant find out its own external hostname, so you have to specify that yourself.

configuration - This is typically loaded from a .properties file

timestamperAddress - If null, this node will become a timestamping node, otherwise, it will use that one.


Constructors

<init> Node(dir: Path, p2pAddr: <ERROR CLASS>, configuration: NodeConfiguration, timestamperAddress: LegallyIdentifiableNode?)

A Node manages a standalone server that takes part in the P2P network. It creates the services found in ServiceHub, loads important data off disk and starts listening for connections.

Properties

log val log: <ERROR CLASS>
p2pAddr val p2pAddr: <ERROR CLASS>
webServer lateinit var webServer: <ERROR CLASS>

Inherited Properties

_servicesThatAcceptUploads val _servicesThatAcceptUploads: ArrayList<AcceptsFileUpload>
configuration val configuration: NodeConfiguration
contractFactory val contractFactory: ContractFactory
dir val dir: Path
identity lateinit var identity: IdentityService
inNodeTimestampingService var inNodeTimestampingService: NodeTimestamperService?
keyManagement lateinit var keyManagement: E2ETestKeyManagementService
legallyIdentifableAddress val legallyIdentifableAddress: LegallyIdentifiableNode
net lateinit var net: MessagingService
serverThread open val serverThread: ExecutorService
services val services: ServiceHub
servicesThatAcceptUploads val servicesThatAcceptUploads: List<AcceptsFileUpload>
smm lateinit var smm: StateMachineManager
storage lateinit var storage: StorageService
timestamperAddress val timestamperAddress: LegallyIdentifiableNode?
wallet lateinit var wallet: WalletService

Functions

makeMessagingService fun makeMessagingService(): MessagingService
start fun start(): Node
stop fun stop(): Unit

Inherited Functions

constructStorageService open fun constructStorageService(attachments: NodeAttachmentService, identity: Party, keypair: KeyPair): StorageServiceImpl
initialiseStorageService open fun initialiseStorageService(dir: Path): StorageService
makeIdentityService open fun makeIdentityService(): IdentityService
makeInterestRateOracleService fun makeInterestRateOracleService(): Unit

Companion Object Properties

DEFAULT_PORT val DEFAULT_PORT: Int

The port that is used by default if none is specified. As you know, 31337 is the most elite number.