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

io.vertx.mutiny.ext.web.handler.LoggerFormatter Maven / Gradle / Ivy

There is a newer version: 3.18.0
Show newest version
package io.vertx.mutiny.ext.web.handler;

import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.smallrye.common.annotation.CheckReturnValue;

/**
 * Implement to format the output of the {@link io.vertx.mutiny.ext.web.handler.LoggerHandler}
 *
 * 

* NOTE: This class has been automatically generated from the {@link io.vertx.ext.web.handler.LoggerFormatter original} non Mutiny-ified interface using Vert.x codegen. */ @io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.web.handler.LoggerFormatter.class) public class LoggerFormatter { public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new LoggerFormatter((io.vertx.ext.web.handler.LoggerFormatter) obj), LoggerFormatter::getDelegate ); private final io.vertx.ext.web.handler.LoggerFormatter delegate; public LoggerFormatter(io.vertx.ext.web.handler.LoggerFormatter delegate) { this.delegate = delegate; } public LoggerFormatter(Object delegate) { this.delegate = (io.vertx.ext.web.handler.LoggerFormatter)delegate; } /** * Empty constructor used by CDI, do not use this constructor directly. **/ LoggerFormatter() { this.delegate = null; } public io.vertx.ext.web.handler.LoggerFormatter getDelegate() { return delegate; } @Override public String toString() { return delegate.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LoggerFormatter that = (LoggerFormatter) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } /** * @param routingContext The routing context * @param ms The number of milliseconds since first receiving the request * @return The formatted string to log */ public String format(io.vertx.mutiny.ext.web.RoutingContext routingContext, long ms) { String ret = delegate.format(routingContext.getDelegate(), ms); return ret; } public static LoggerFormatter newInstance(io.vertx.ext.web.handler.LoggerFormatter arg) { return arg != null ? new LoggerFormatter(arg) : null; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy