java.lang.Object
io.fluxzero.common.handling.TypedParameterResolver<Object>
io.fluxzero.sdk.tracking.handling.MetadataParameterResolver
- All Implemented Interfaces:
io.fluxzero.common.handling.ParameterResolver<Object>
public class MetadataParameterResolver
extends io.fluxzero.common.handling.TypedParameterResolver<Object>
Resolves handler method parameters of type
Metadata.
This resolver can inject metadata into handler methods in two ways:
- If the message being handled implements
HasMetadata, its metadata is directly returned. - Otherwise, the metadata is extracted from the current
DeserializingMessage(if available).
Example handler:
@HandleCommand
public void handle(MyCommand command, Metadata metadata) {
String user = metadata.get("userId");
}
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.fluxzero.common.handling.TypedParameterResolver
matchesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxzero.common.handling.ParameterResolver
determinesSpecificity, filterMessage
-
Constructor Details
-
MetadataParameterResolver
public MetadataParameterResolver()
-
-
Method Details
-
resolve
-