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

io.vertx.rxjava3.core.MaybeHelper Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR2
Show newest version
package io.vertx.rxjava3.core;

import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.core.type.TypeReference;
import io.reactivex.rxjava3.core.MaybeTransformer;
import io.vertx.rxjava3.core.buffer.Buffer;
import io.vertx.rxjava3.impl.MaybeUnmarshaller;

/**
 * @author Julien Viet
 */
public class MaybeHelper {

  public static  MaybeTransformer unmarshaller(Class mappedType) {
    return new MaybeUnmarshaller<>(Buffer::getDelegate, mappedType);
  }

  public static  MaybeTransformer unmarshaller(TypeReference mappedTypeRef) {
    return new MaybeUnmarshaller<>(Buffer::getDelegate, mappedTypeRef);
  }

  public static  MaybeTransformer unmarshaller(Class mappedType, ObjectCodec mapper) {
    return new MaybeUnmarshaller<>(Buffer::getDelegate, mappedType, mapper);
  }

  public static  MaybeTransformer unmarshaller(TypeReference mappedTypeRef, ObjectCodec mapper) {
    return new MaybeUnmarshaller<>(Buffer::getDelegate, mappedTypeRef, mapper);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy