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

io.fluxcapacitor.javaclient.publishing.ResultGateway Maven / Gradle / Ivy

There is a newer version: 0.1015.0
Show newest version
package io.fluxcapacitor.javaclient.publishing;

import io.fluxcapacitor.common.api.Metadata;
import io.fluxcapacitor.javaclient.common.Message;

public interface ResultGateway {

    default void respond(Object response, String target, int requestId) {
        if (response instanceof Message) {
            respond(((Message) response).getPayload(), ((Message) response).getMetadata(), target, requestId);
        } else {
            respond(response, Metadata.empty(), target, requestId);
        }
    }

    void respond(Object payload, Metadata metadata, String target, int requestId);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy