Class IridaOAuthException

  • All Implemented Interfaces:
    java.io.Serializable

    public class IridaOAuthException
    extends java.lang.RuntimeException
    Exception thrown when attempting to read from a remote API via OAuth2 fails. This exception will often be thrown when a RemoteAPIToken is invalid or expired.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      IridaOAuthException​(java.lang.String message, RemoteAPI remoteAPI)
      Create a new IridaOAuthException with the given message and service
      IridaOAuthException​(java.lang.String message, RemoteAPI remoteAPI, java.lang.Throwable cause)
      Create a new IridaOAuthException with the given message and service
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      RemoteAPI getRemoteAPI()
      Get the service trying to be accessed when this exception was thrown
      void setRemoteAPI​(RemoteAPI remoteAPI)
      Set the service for this exception
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IridaOAuthException

        public IridaOAuthException​(java.lang.String message,
                                   RemoteAPI remoteAPI)
        Create a new IridaOAuthException with the given message and service
        Parameters:
        message - The message for this exception
        remoteAPI - The service trying to be accessed when this exception was thrown
      • IridaOAuthException

        public IridaOAuthException​(java.lang.String message,
                                   RemoteAPI remoteAPI,
                                   java.lang.Throwable cause)
        Create a new IridaOAuthException with the given message and service
        Parameters:
        message - The message for this exception
        remoteAPI - The service trying to be accessed when this exception was thrown
        cause - The reason this exception was thrown
    • Method Detail

      • getRemoteAPI

        public RemoteAPI getRemoteAPI()
        Get the service trying to be accessed when this exception was thrown
        Returns:
        The URI of the service
      • setRemoteAPI

        public void setRemoteAPI​(RemoteAPI remoteAPI)
        Set the service for this exception
        Parameters:
        remoteAPI - the URI of the service