Class MessagesLocal

java.lang.Object
org.omnifaces.util.MessagesLocal

public final class MessagesLocal extends Object

Collection of utility methods for the Faces API with respect to working with FacesMessage.

The difference with Messages is that no one method of MessagesLocal obtains the FacesContext from the current thread by FacesContext.getCurrentInstance(). This job is up to the caller. This is more efficient in situations where multiple utility methods needs to be called at the same time. Invoking FacesContext.getCurrentInstance() is at its own an extremely cheap operation, however as it's to be obtained as a ThreadLocal variable, it's during the call still blocking all other running threads for some nanoseconds or so.

Since:
4.2
Author:
Bauke Scholtz
See Also: