public final class FixedMessage extends Object implements LocalizedMessage
LocalizedMessage that just returns a fixed message string, without resolving any
localized values. This is intended for situations where it is not possible, or not practical, to obtain a value that
is customized for a specific locale.| Constructor and Description |
|---|
FixedMessage(String message)
Creates a new
FixedMessage from a message string. |
| Modifier and Type | Method and Description |
|---|---|
String |
resolve(Locale locale,
LocalizedMessageResolver resolver)
Resolves this message for a specific
Locale. |
String |
toString() |
public FixedMessage(String message)
FixedMessage from a message string.message - the fixed/static message string to be returned when resolve(Locale,
LocalizedMessageResolver) is invokedpublic String resolve(Locale locale, LocalizedMessageResolver resolver)
LocalizedMessageLocale.
This method does not guarantee that the returned value will be customized for the specified locale, but ensures that a best-effort attempt is made to do so.
resolve in interface LocalizedMessagelocale - the target language/region to localize the message forresolver - used to lookup localized messages by keyCopyright 2023 Ping Identity Corp. All rights reserved.