public class DurationParam extends AbstractParam<io.dropwizard.util.Duration>
400 Bad
Request response. Supports all input formats the Duration class supports.| Constructor and Description |
|---|
DurationParam(String input) |
DurationParam(String input,
String parameterName) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
errorMessage(Exception e)
Given a string representation which was unable to be parsed and the exception thrown, produce
an entity to be sent to the client.
|
protected io.dropwizard.util.Duration |
parse(String input)
Given a string representation, parse it and return an instance of the parameter type.
|
equals, error, get, getErrorStatus, hashCode, mediaType, toStringprotected String errorMessage(Exception e)
AbstractParamerrorMessage in class AbstractParam<io.dropwizard.util.Duration>e - the exception thrown while parsing inputprotected io.dropwizard.util.Duration parse(@Nullable String input) throws Exception
AbstractParamparse in class AbstractParam<io.dropwizard.util.Duration>input - the raw inputinput, parsed as an instance of TException - if there is an error parsing the inputCopyright © 2018. All rights reserved.