Class MessageFactory
java.lang.Object
org.apache.tomcat.jdbc.pool.util.MessageFactory
Factory for creating localized JDBC pool messages.
The messages are read from the LocalStrings resource bundle of this
package, which the JVM resolves once, under the default locale in effect at
class initialization. A message is handed out unchanged by
get(String) and passed through MessageFormat by
get(String, Object...), so bundle text must match how its key is
fetched: a key fetched without arguments is written literally, while a key
fetched with arguments follows the MessageFormat conventions, where a
literal single quote is written ''.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet a localized message.static StringGet a localized message with arguments substituted by MessageFormat.protected StringgetInternal(String key) Get a message from the bundle.protected StringgetInternal(String key, Object... args) Get a message from the bundle with arguments.
-
Constructor Details
-
MessageFactory
-
-
Method Details
-
get
-
get
Get a localized message with arguments substituted by MessageFormat. The argument array is never modified. A pattern that MessageFormat cannot apply is returned unformatted rather than reported as a failure.- Parameters:
key- the message keyargs- the arguments- Returns:
- the message
-
getInternal
-
getInternal
-