Class SuspendedTextOutputCallback
java.lang.Object
javax.security.auth.callback.TextOutputCallback
org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback
- All Implemented Interfaces:
Serializable
,Callback
Suspended text output callback extends
TextOutputCallback
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 of Action.suspend(SuspensionHandler)
.- Since:
- 7.0.0
- See Also:
-
Field Summary
Fields inherited from class javax.security.auth.callback.TextOutputCallback
ERROR, INFORMATION, WARNING
-
Constructor Summary
ConstructorDescriptionSuspendedTextOutputCallback
(int messageType, String message) Construct a new instance with a message type and message to be displayed. -
Method Summary
Modifier and TypeMethodDescriptionstatic SuspendedTextOutputCallback
Creates a newSuspendedTextOutputCallback
instance along with an error based message.static SuspendedTextOutputCallback
Creates a newSuspendedTextOutputCallback
instance along with an information based message.static SuspendedTextOutputCallback
Creates a newSuspendedTextOutputCallback
instance along with an warning based message.Methods inherited from class javax.security.auth.callback.TextOutputCallback
getMessage, getMessageType
-
Constructor Details
-
SuspendedTextOutputCallback
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 Details
-
info
Creates a newSuspendedTextOutputCallback
instance along with an information based message.- Parameters:
message
- the information based message- Returns:
- new
SuspendedTextOutputCallback
instance
-
warn
Creates a newSuspendedTextOutputCallback
instance along with an warning based message.- Parameters:
message
- the warning based message- Returns:
- new
SuspendedTextOutputCallback
instance
-
error
Creates a newSuspendedTextOutputCallback
instance along with an error based message.- Parameters:
message
- the error based message- Returns:
- new
SuspendedTextOutputCallback
instance
-