package click.kamil.domain;

import org.springframework.messaging.support.GenericMessage;

import java.util.Map;

public class CustomStateMachineMessage<T, P> extends GenericMessage<T> {

    private final P customPayload;

    public CustomStateMachineMessage(T payload, P customPayload) {
        super(payload);
        this.customPayload = customPayload;
    }

    public CustomStateMachineMessage(T payload, Map<String, Object> headers, P customPayload) {
        super(payload, headers);
        this.customPayload = customPayload;
    }

    public P getCustomPayload() {
        return customPayload;
    }
}
