Package org.springframework.context.i18n

# Class LocaleContextThreadLocalAccessor

java.lang.Object
org.springframework.context.i18n.LocaleContextThreadLocalAccessor

All Implemented Interfaces:
  `io.micrometer.context.ThreadLocalAccessor<LocaleContext>`

public class LocaleContextThreadLocalAccessor extends Object implements io.micrometer.context.ThreadLocalAccessor<LocaleContext>
Adapt `LocaleContextHolder` to the `ThreadLocalAccessor` contract to assist the Micrometer Context Propagation library with `LocaleContext` propagation.

Since:
  6.2
Author:
  Tadaya Tsuyukubo

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`KEY`
Key under which this accessor is registered in `ContextRegistry`.

## Constructor Summary

Constructors
Constructor
Description
`LocaleContextThreadLocalAccessor()`

## Method Summary

Modifier and Type
Method
Description
`LocaleContext`
`getValue()`
`Object`
`key()`
`void`
`setValue()`
`void`
`setValue(LocaleContext value)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface io.micrometer.context.ThreadLocalAccessor

`reset, restore, restore`

## Field Details

### KEY

public static final String KEY
Key under which this accessor is registered in `ContextRegistry`.

## Constructor Details

### LocaleContextThreadLocalAccessor

public LocaleContextThreadLocalAccessor()

## Method Details

### key

public Object key()

Specified by:
  `key` in interface `io.micrometer.context.ThreadLocalAccessor<LocaleContext>`

### getValue

@Nullable public LocaleContext getValue()

Specified by:
  `getValue` in interface `io.micrometer.context.ThreadLocalAccessor<LocaleContext>`

### setValue

public void setValue(LocaleContext value)

Specified by:
  `setValue` in interface `io.micrometer.context.ThreadLocalAccessor<LocaleContext>`

### setValue

public void setValue()

Specified by:
  `setValue` in interface `io.micrometer.context.ThreadLocalAccessor<LocaleContext>`