
com.codebullets.sagalib.KeyReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of saga-lib Show documentation
Show all versions of saga-lib Show documentation
Java saga pattern library to organize and handle domain events.
The newest version!
package com.codebullets.sagalib;
import com.codebullets.sagalib.context.LookupContext;
import javax.annotation.Nullable;
/**
* Defines a way to read the saga instance key from a message.
*
* @param The type of message to read the key from.
* @param The type of the key returned from the message.
*/
public interface KeyReader {
/**
* Read the saga instance key from the provided message.
* @return instance key of the message or null if key is empty or not found.
*/
@Nullable
KEY readKey(MESSAGE message, LookupContext lookupContext);
/**
* Gets the class associated with the reader.
*/
Class getMessageClass();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy