All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codebullets.sagalib.KeyReader Maven / Gradle / Ivy

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