Interface AuthChallengeCompleteEvent.Result.Error
- All Superinterfaces:
AuthChallengeCompleteEvent.Result
- All Known Subinterfaces:
AuthChallengeCompleteEvent.Result.Error.Cancelled
,AuthChallengeCompleteEvent.Result.Error.Generic
,AuthChallengeCompleteEvent.Result.Error.Timeout
- Enclosing interface:
- AuthChallengeCompleteEvent.Result
public static interface AuthChallengeCompleteEvent.Result.Error
extends AuthChallengeCompleteEvent.Result
Representation of a failed authentication challenge result.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Representation of the result of an authentication challenge which failed due to the user cancelling the authentication challenge.static interface
Representation of the result of an authentication challenge which failed due to a generic error.static interface
Representation of the result of an authentication challenge which failed due to a timeout.Nested classes/interfaces inherited from interface com.inductiveautomation.perspective.gateway.api.AuthChallengeCompleteEvent.Result
AuthChallengeCompleteEvent.Result.Error, AuthChallengeCompleteEvent.Result.Success
-
Method Summary
Modifier and TypeMethodDescriptionAlways throws anUnsupportedOperationException
since thisAuthChallengeCompleteEvent.Result
represents an errorboolean
default boolean
isError()
boolean
default boolean
boolean
-
Method Details
-
isSuccess
default boolean isSuccess()- Specified by:
isSuccess
in interfaceAuthChallengeCompleteEvent.Result
- Returns:
- false since this
AuthChallengeCompleteEvent.Result
represents an error
-
isError
default boolean isError()- Specified by:
isError
in interfaceAuthChallengeCompleteEvent.Result
- Returns:
- true since this
AuthChallengeCompleteEvent.Result
represents an error
-
getAsSuccess
Always throws anUnsupportedOperationException
since thisAuthChallengeCompleteEvent.Result
represents an error- Specified by:
getAsSuccess
in interfaceAuthChallengeCompleteEvent.Result
- Returns:
- the result as a
AuthChallengeCompleteEvent.Result.Success
object if the result is successful, otherwise throws anUnsupportedOperationException
if the result is an error. CheckAuthChallengeCompleteEvent.Result.isSuccess()
orAuthChallengeCompleteEvent.Result.isError()
before calling this method to ensure you get the correct result type.
-
getAsError
- Specified by:
getAsError
in interfaceAuthChallengeCompleteEvent.Result
- Returns:
- this
AuthChallengeCompleteEvent.Result
typed asAuthChallengeCompleteEvent.Result.Error
-
isGeneric
boolean isGeneric()- Returns:
- true if the error is generic (in other words: a catch-all error scenario which is not specific).
Call
getAsGeneric()
to get thisAuthChallengeCompleteEvent.Result.Error
object typed as aAuthChallengeCompleteEvent.Result.Error.Generic
object for access to methods which provide specific details pertaining to the generic error.
-
isTimeout
boolean isTimeout()- Returns:
- true if the error is due to a timeout. Call
getAsTimeout()
to get thisAuthChallengeCompleteEvent.Result.Error
object typed as aAuthChallengeCompleteEvent.Result.Error.Timeout
object for access to methods which provide specific details pertaining to the timeout error.
-
isCancelled
boolean isCancelled()- Returns:
- true if the error is due to the user cancelling the authentication challenge. Call
getAsCancelled()
to get thisAuthChallengeCompleteEvent.Result.Error
object typed as aAuthChallengeCompleteEvent.Result.Error.Cancelled
object for access to methods which provide specific details pertaining to the cancelled error.
-
getAsGeneric
AuthChallengeCompleteEvent.Result.Error.Generic getAsGeneric()- Returns:
- this
AuthChallengeCompleteEvent.Result.Error
object typed as aAuthChallengeCompleteEvent.Result.Error.Generic
object if this error is generic, otherwise throws anUnsupportedOperationException
if this error is not generic. CheckisGeneric()
before calling this method to ensure you get the correct result type.
-
getAsTimeout
AuthChallengeCompleteEvent.Result.Error.Timeout getAsTimeout()- Returns:
- this
AuthChallengeCompleteEvent.Result.Error
object typed as aAuthChallengeCompleteEvent.Result.Error.Timeout
object if this error is due to a timeout, otherwise throws anUnsupportedOperationException
if this error is not due to a timeout. CheckisTimeout()
before calling this method to ensure you get the correct result type.
-
getAsCancelled
AuthChallengeCompleteEvent.Result.Error.Cancelled getAsCancelled()- Returns:
- this
AuthChallengeCompleteEvent.Result.Error
object typed as aAuthChallengeCompleteEvent.Result.Error.Cancelled
object if this error is due to the user cancelling the authentication challenge, otherwise throws anUnsupportedOperationException
if this error is not due to the user cancelling the authentication challenge. CheckisCancelled()
before calling this method to ensure you get the correct result type.
-