Package com.privatechain.core.event
package com.privatechain.core.event
Sealed event hierarchy and the asynchronous publish-subscribe event bus.
All blockchain state changes are communicated through this package:
BlockchainEvent— sealed base type for all events; five permitted subtypes:BlockAddedEvent,TransactionSubmittedEvent,PeerConnectedEvent,PeerDisconnectedEvent,ForkDetectedEvent(FR-EVENT-01).BlockchainEventBus— thread-safe event bus that dispatches events asynchronously to registered listeners via a daemon executor (FR-EVENT-03).BlockchainEventListener— functional interface for receiving events; multiple implementations may be registered (FR-EVENT-02).
- Since:
- 1.0.0
-
ClassDescriptionSealed base type for all events published on the
BlockchainEventBus.Fired after a new block is successfully appended to the canonical chain.Fired when the node detects two competing valid blocks at the same chain height.Fired when a new peer successfully establishes a TCP connection to this node.Fired when a peer connection is closed, either gracefully or due to an error.Fired after a transaction successfully passes validation and enters the mempool.Thread-safe, asynchronous publish/subscribe event bus for blockchain lifecycle events.Listener interface for receiving events from theBlockchainEventBus.