data class InvocationContext
Models the information needed to trace an invocation in Corda. Includes initiating actor, origin, trace information, and optional external trace information to correlate clients' IDs.
InvocationContext(origin: InvocationOrigin, trace: Trace, actor: Actor?, externalTrace: Trace? = null, impersonatedActor: Actor? = null) InvocationContext(origin: InvocationOrigin, trace: Trace, actor: Actor?, externalTrace: Trace? = null, impersonatedActor: Actor? = null, arguments: List<Any?>? = emptyList(), clientId: String? = null)
Models the information needed to trace an invocation in Corda. Includes initiating actor, origin, trace information, and optional external trace information to correlate clients' IDs. |
val actor: Actor?
Acting agent of the invocation, used to derive the security principal. |
|
val arguments: List<Any?>? |
|
val clientId: String? |
|
val externalTrace: Trace?
Optional external invocation trace for cross-system logs correlation. |
|
val impersonatedActor: Actor?
Optional impersonated actor, used for logging but not for authorisation. |
|
val origin: InvocationOrigin
Origin of the invocation. |
|
val trace: Trace
Corda invocation trace. |
fun copy(origin: InvocationOrigin = this.origin, trace: Trace = this.trace, actor: Actor? = this.actor, externalTrace: Trace? = this.externalTrace, impersonatedActor: Actor? = this.impersonatedActor): InvocationContext |
|
fun principal(): Principal
Associated security principal. |
fun newInstance(origin: InvocationOrigin, trace: Trace = Trace.newInstance(), actor: Actor? = null, externalTrace: Trace? = null, impersonatedActor: Actor? = null, arguments: List<Any?> = emptyList(), clientId: String? = null): InvocationContext
Creates an InvocationContext with a Trace that defaults to a java.util.UUID as value and java.time.Instant.now timestamp. |
|
fun peer(party: CordaX500Name, trace: Trace = Trace.newInstance(), externalTrace: Trace? = null, impersonatedActor: Actor? = null): InvocationContext
Creates an InvocationContext with InvocationOrigin.Peer origin. |
|
fun rpc(actor: Actor, trace: Trace = Trace.newInstance(), externalTrace: Trace? = null, impersonatedActor: Actor? = null, arguments: List<Any?> = emptyList()): InvocationContext
Creates an InvocationContext with InvocationOrigin.RPC origin. |
|
fun scheduled(scheduledState: ScheduledStateRef, trace: Trace = Trace.newInstance(), externalTrace: Trace? = null): InvocationContext
Creates an InvocationContext with InvocationOrigin.Scheduled origin. |
|
fun service(serviceClassName: String, owningLegalIdentity: CordaX500Name, trace: Trace = Trace.newInstance(), externalTrace: Trace? = null): InvocationContext
Creates an InvocationContext with InvocationOrigin.Service origin. |
|
fun shell(trace: Trace = Trace.newInstance(), externalTrace: Trace? = null): InvocationContext
Creates an InvocationContext with InvocationOrigin.Shell origin. |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |