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 extendsTextOutputCallback
to 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 SuspendedTextOutputCallback
error(String message)
Creates a newSuspendedTextOutputCallback
instance along with an error based message.static SuspendedTextOutputCallback
info(String message)
Creates a newSuspendedTextOutputCallback
instance along with an information based message.static SuspendedTextOutputCallback
warn(String message)
Creates a newSuspendedTextOutputCallback
instance 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
,WARNING
orERROR
)message
- the message to be displayed- Throws:
IllegalArgumentException
- ifmessageType
is not eitherINFORMATION
,WARNING
orERROR
, ifmessage
is null, or ifmessage
has a length of 0
-
-
Method Detail
-
info
public static SuspendedTextOutputCallback info(String message)
Creates a newSuspendedTextOutputCallback
instance along with an information based message.- Parameters:
message
- the information based message- Returns:
- new
SuspendedTextOutputCallback
instance
-
warn
public static SuspendedTextOutputCallback warn(String message)
Creates a newSuspendedTextOutputCallback
instance along with an warning based message.- Parameters:
message
- the warning based message- Returns:
- new
SuspendedTextOutputCallback
instance
-
error
public static SuspendedTextOutputCallback error(String message)
Creates a newSuspendedTextOutputCallback
instance along with an error based message.- Parameters:
message
- the error based message- Returns:
- new
SuspendedTextOutputCallback
instance
-
-