mirror of
https://github.com/corda/corda.git
synced 2025-06-18 23:28:21 +00:00
Protocols can use the serviceHub lazily in their constructors
This commit is contained in:
@ -31,7 +31,11 @@ abstract class ProtocolLogic<T> {
|
||||
/** This is where you should log things to. */
|
||||
val logger: Logger get() = psm.logger
|
||||
|
||||
/** Provides access to big, heavy classes that may be reconstructed from time to time, e.g. across restarts */
|
||||
/**
|
||||
* Provides access to big, heavy classes that may be reconstructed from time to time, e.g. across restarts. It is
|
||||
* only available once the protocol has started, which means it cannnot be accessed in the constructor. Either
|
||||
* access this lazily or from inside [call].
|
||||
*/
|
||||
val serviceHub: ServiceHub get() = psm.serviceHub
|
||||
|
||||
// Kotlin helpers that allow the use of generic types.
|
||||
|
Reference in New Issue
Block a user