Class SuspendedTextOutputCallback
- java.lang.Object
-
- javax.security.auth.callback.TextOutputCallback
-
- org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback
-
- All Implemented Interfaces:
Serializable,Callback
@EvolvingAll public final class SuspendedTextOutputCallback extends TextOutputCallback
Suspended text output callback extendsTextOutputCallbackto allow a custom message to be displayed to the user whilst informing the client that the current auth flow has been suspended. Note, this callback only makes sense in the context of being used in line with suspending the current tree, by means ofAction.suspend(SuspensionHandler).- Since:
- 7.0.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.security.auth.callback.TextOutputCallback
ERROR, INFORMATION, WARNING
-
-
Constructor Summary
Constructors Constructor Description SuspendedTextOutputCallback(int messageType, String message)Construct a new instance with a message type and message to be displayed.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SuspendedTextOutputCallbackerror(String message)Creates a newSuspendedTextOutputCallbackinstance along with an error based message.static SuspendedTextOutputCallbackinfo(String message)Creates a newSuspendedTextOutputCallbackinstance along with an information based message.static SuspendedTextOutputCallbackwarn(String message)Creates a newSuspendedTextOutputCallbackinstance along with an warning based message.-
Methods inherited from class javax.security.auth.callback.TextOutputCallback
getMessage, getMessageType
-
-
-
-
Constructor Detail
-
SuspendedTextOutputCallback
public SuspendedTextOutputCallback(int messageType, String message)Construct a new instance with a message type and message to be displayed.- Parameters:
messageType- the message type (INFORMATION,WARNINGorERROR)message- the message to be displayed- Throws:
IllegalArgumentException- ifmessageTypeis not eitherINFORMATION,WARNINGorERROR, ifmessageis null, or ifmessagehas a length of 0
-
-
Method Detail
-
info
public static SuspendedTextOutputCallback info(String message)
Creates a newSuspendedTextOutputCallbackinstance along with an information based message.- Parameters:
message- the information based message- Returns:
- new
SuspendedTextOutputCallbackinstance
-
warn
public static SuspendedTextOutputCallback warn(String message)
Creates a newSuspendedTextOutputCallbackinstance along with an warning based message.- Parameters:
message- the warning based message- Returns:
- new
SuspendedTextOutputCallbackinstance
-
error
public static SuspendedTextOutputCallback error(String message)
Creates a newSuspendedTextOutputCallbackinstance along with an error based message.- Parameters:
message- the error based message- Returns:
- new
SuspendedTextOutputCallbackinstance
-
-