Class DateFormatConfiguration
java.lang.Object
org.jolokia.service.serializer.json.DateFormatConfiguration
-
Constructor Summary
ConstructorsConstructorDescriptionCreates formatting configuration with default pattern and time zoneDateFormatConfiguration(String format, String timeZone) Creates formatting configuration with format and timeZoneDateFormatConfiguration(String format, TimeZone timeZone) Creates formatting configuration with format and timeZoneDateFormatConfiguration(org.jolokia.server.core.service.api.JolokiaContext pContext) Creates formatting configuration usingJolokiaContext -
Method Summary
Modifier and TypeMethodDescriptionGetZoneRulesfrom theDateTimeFormatterwhich should have its zone configured.parseAsDate(String value) parseAsTemporal(Class<?> temporalType, String pValue) toUnixTime(Temporal temporal) toUnixTime(Calendar calendar) toUnixTime(Date date) unixTimeInNanosToTemporal(Class<?> temporalType, Long v) unixTimeToTemporal(Class<?> temporalType, Long v) booleanbooleanusesUnixTime(Temporal temporal)
-
Constructor Details
-
DateFormatConfiguration
public DateFormatConfiguration()Creates formatting configuration with default pattern and time zone -
DateFormatConfiguration
Creates formatting configuration with format and timeZone- Parameters:
format-timeZone-
-
DateFormatConfiguration
public DateFormatConfiguration(org.jolokia.server.core.service.api.JolokiaContext pContext) Creates formatting configuration usingJolokiaContext- Parameters:
pContext-
-
DateFormatConfiguration
Creates formatting configuration with format and timeZone- Parameters:
format-timeZone-
-
-
Method Details
-
getZoneRules
GetZoneRulesfrom theDateTimeFormatterwhich should have its zone configured.- Returns:
-
getResolverFields
-
usesUnixTime
public boolean usesUnixTime() -
usesUnixTime
-
toUnixTime
-
unixTimeToDate
-
unixTimeInMillisToDate
-
toUnixTime
-
toUnixTime
-
unixTimeToTemporal
-
unixTimeInNanosToTemporal
-
format
-
format
-
format
-
parseAsDate
- Throws:
ParseException
-
parseAsTemporal
-