Class UIResponse
- java.lang.Object
-
- com.inductiveautomation.ignition.common.messages.UIResponse
-
- All Implemented Interfaces:
UICallback
,java.io.Serializable
public class UIResponse extends java.lang.Object implements UICallback, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UIResponse(java.util.Locale locale)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attempt(FragileRunnable<?> method)
Attempt to run the given method, catching any Throwable and adding it as an error to the UIResponse.void
error(java.lang.String message, java.lang.Object... args)
java.util.List<java.lang.String>
getErrors()
java.util.List<java.lang.String>
getInfos()
java.util.Locale
getLocale()
java.util.List<java.lang.String>
getWarns()
void
info(java.lang.String message, java.lang.Object... args)
void
warn(java.lang.String message, java.lang.Object... args)
static UIResponse
wrap(java.util.Locale locale, java.util.function.Consumer<UIResponse> fx)
Create a new UIResponse with the given locale, then run the consumer function.
-
-
-
Method Detail
-
wrap
public static UIResponse wrap(java.util.Locale locale, java.util.function.Consumer<UIResponse> fx)
Create a new UIResponse with the given locale, then run the consumer function.
-
attempt
public void attempt(FragileRunnable<?> method)
Attempt to run the given method, catching any Throwable and adding it as an error to the UIResponse.
-
getLocale
public java.util.Locale getLocale()
- Specified by:
getLocale
in interfaceUICallback
-
warn
public void warn(java.lang.String message, java.lang.Object... args)
- Specified by:
warn
in interfaceUICallback
-
error
public void error(java.lang.String message, java.lang.Object... args)
- Specified by:
error
in interfaceUICallback
-
info
public void info(java.lang.String message, java.lang.Object... args)
- Specified by:
info
in interfaceUICallback
-
getWarns
public java.util.List<java.lang.String> getWarns()
-
getErrors
public java.util.List<java.lang.String> getErrors()
-
getInfos
public java.util.List<java.lang.String> getInfos()
-
-