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

io.quarkiverse.reactive.messaging.nats.jetstream.mapper.PayloadMapper Maven / Gradle / Ivy

There is a newer version: 3.17.0
Show newest version
package io.quarkiverse.reactive.messaging.nats.jetstream.mapper;

import java.util.Optional;

import io.nats.client.api.MessageInfo;

public interface PayloadMapper {

    byte[] of(Object payload);

     T of(byte[] data, Class type);

     Optional of(io.nats.client.Message message);

     Optional of(MessageInfo message);

    default  T of(io.nats.client.Message message, Class payLoadType) {
        return of(message.getData(), payLoadType);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy