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

io.vertx.reactivex.core.SingleHelper Maven / Gradle / Ivy

The newest version!
package io.vertx.reactivex.core;

import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.core.type.TypeReference;
import io.reactivex.SingleTransformer;
import io.vertx.core.buffer.Buffer;
import io.vertx.reactivex.impl.SingleUnmarshaller;

import java.util.function.Function;

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

  public static  SingleTransformer unmarshaller(Class mappedType) {
    return new SingleUnmarshaller<>(Function.identity(), mappedType);
  }

  public static  SingleTransformer unmarshaller(TypeReference mappedTypeRef) {
    return new SingleUnmarshaller<>(Function.identity(), mappedTypeRef);
  }

  public static  SingleTransformer unmarshaller(Class mappedType, ObjectCodec mapper) {
    return new SingleUnmarshaller<>(Function.identity(), mappedType, mapper);
  }

  public static  SingleTransformer unmarshaller(TypeReference mappedTypeRef, ObjectCodec mapper) {
    return new SingleUnmarshaller<>(Function.identity(), mappedTypeRef, mapper);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy