Class ThreadLocalLocaleResolver
java.lang.Object
io.github.belgif.rest.problem.ee.jaxrs.i18n.ThreadLocalLocaleResolver
- All Implemented Interfaces:
- LocaleResolver
LocaleResolver implementation that uses a ThreadLocal.
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
ThreadLocalLocaleResolverpublic ThreadLocalLocaleResolver()
 
- 
- 
Method Details- 
getLocaleDescription copied from interface:LocaleResolverGet the current Locale- Specified by:
- getLocalein interface- LocaleResolver
- Returns:
- the current Locale
 
- 
setLocaleSet the locale of the current request.NOTE: The locale is stored in a ThreadLocal that must be cleaned up with clear().- Parameters:
- locale- the locale of the current request.
 
- 
clearpublic static void clear()Clear the locale of the current request.
 
-