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 interfaceRepresentation of the result of an authentication challenge which failed due to the user cancelling the authentication challenge.static interfaceRepresentation of the result of an authentication challenge which failed due to a generic error.static interfaceRepresentation 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 anUnsupportedOperationExceptionsince thisAuthChallengeCompleteEvent.Resultrepresents an errorbooleandefault booleanisError()booleandefault booleanboolean
-
Method Details
-
isSuccess
default boolean isSuccess()- Specified by:
isSuccessin interfaceAuthChallengeCompleteEvent.Result- Returns:
- false since this
AuthChallengeCompleteEvent.Resultrepresents an error
-
isError
default boolean isError()- Specified by:
isErrorin interfaceAuthChallengeCompleteEvent.Result- Returns:
- true since this
AuthChallengeCompleteEvent.Resultrepresents an error
-
getAsSuccess
Always throws anUnsupportedOperationExceptionsince thisAuthChallengeCompleteEvent.Resultrepresents an error- Specified by:
getAsSuccessin interfaceAuthChallengeCompleteEvent.Result- Returns:
- the result as a
AuthChallengeCompleteEvent.Result.Successobject if the result is successful, otherwise throws anUnsupportedOperationExceptionif 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:
getAsErrorin interfaceAuthChallengeCompleteEvent.Result- Returns:
- this
AuthChallengeCompleteEvent.Resulttyped 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.Errorobject typed as aAuthChallengeCompleteEvent.Result.Error.Genericobject 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.Errorobject typed as aAuthChallengeCompleteEvent.Result.Error.Timeoutobject 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.Errorobject typed as aAuthChallengeCompleteEvent.Result.Error.Cancelledobject for access to methods which provide specific details pertaining to the cancelled error.
-
getAsGeneric
AuthChallengeCompleteEvent.Result.Error.Generic getAsGeneric()- Returns:
- this
AuthChallengeCompleteEvent.Result.Errorobject typed as aAuthChallengeCompleteEvent.Result.Error.Genericobject if this error is generic, otherwise throws anUnsupportedOperationExceptionif 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.Errorobject typed as aAuthChallengeCompleteEvent.Result.Error.Timeoutobject if this error is due to a timeout, otherwise throws anUnsupportedOperationExceptionif 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.Errorobject typed as aAuthChallengeCompleteEvent.Result.Error.Cancelledobject if this error is due to the user cancelling the authentication challenge, otherwise throws anUnsupportedOperationExceptionif 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.
-