extractDeclared

open override fun <T : Any> extractDeclared(type: Class<T>): T?

Extracts an object of the specified type from the exchange context.

This method extends the parent implementation to also check for command aggregates, event streams, and errors that may be stored in the exchange.

Return

an object of type T if found, null otherwise

Parameters

type

the Class representing the type to extract

Type Parameters

T

the type of object to extract

See also