Class ThresholdConverter
java.lang.Object
io.quarkus.resteasy.common.runtime.config.ThresholdConverter
- All Implemented Interfaces:
Serializable,org.eclipse.microprofile.config.spi.Converter<org.jboss.resteasy.spi.config.Threshold>
@Priority(200)
public class ThresholdConverter
extends Object
implements org.eclipse.microprofile.config.spi.Converter<org.jboss.resteasy.spi.config.Threshold>, Serializable
A converter for a
Threshold interface.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NONE
public static final org.jboss.resteasy.spi.config.Threshold NONE -
DEFAULT
public static final org.jboss.resteasy.spi.config.Threshold DEFAULT
-
-
Constructor Details
-
ThresholdConverter
public ThresholdConverter()
-
-
Method Details
-
convert
The converter accepts a value which start with a number by implicitly appending `PT` to it. If the value consists only of a number, it implicitly treats the value as seconds. Otherwise, tries to convert the value assuming that it is in the accepted ISO-8601 duration format.- Specified by:
convertin interfaceorg.eclipse.microprofile.config.spi.Converter<org.jboss.resteasy.spi.config.Threshold>- Parameters:
value- duration as String- Returns:
Duration
-