Class LoginFailedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.tentackle.common.TentackleRuntimeException
org.tentackle.session.PersistenceException
org.tentackle.session.LoginFailedException
All Implemented Interfaces:
Serializable, Loggable
Direct Known Subclasses:
AlreadyLoggedInException, AuthenticationException, VersionIncompatibleException

public class LoginFailedException extends PersistenceException implements Loggable
Thrown if a login is refused, because authentication failed or for any other reason.

Application servers throw it (or one of its subclasses) to refuse a client's login. It is an expected exception and therefore not logged at all, see getLogLevel().

Author:
harald
See Also:
  • Constructor Details

    • LoginFailedException

      public LoginFailedException(Session session)
      Constructs a new login failed exception for a given session with null as its detail message. The cause is not initialized and may subsequently be initialized by a call to Throwable.initCause(Throwable).
      Parameters:
      session - the session
    • LoginFailedException

      public LoginFailedException(Session session, String message)
      Constructs a new login failed exception for a given session with the specified detail message. The cause is not initialized and may subsequently be initialized by a call to Throwable.initCause(Throwable).
      Parameters:
      session - the session
      message - the detail message. The detail message is saved for later retrieval by the PersistenceException.getMessage() method.
    • LoginFailedException

      public LoginFailedException(Session session, String message, Throwable cause)
      Constructs a new login failed exception for a given session with the specified detail message and cause.
      Parameters:
      session - the session
      message - the detail message (which is saved for later retrieval by the PersistenceException.getMessage() method).
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted and indicates that the cause is nonexistent or unknown.)
    • LoginFailedException

      public LoginFailedException(Session session, Throwable cause)
      Constructs a new login failed exception for a given session with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for runtime exceptions that are little more than wrappers for other Throwables.
      Parameters:
      session - the session
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted and indicates that the cause is nonexistent or unknown.)
    • LoginFailedException

      public LoginFailedException(Identifiable object)
      Constructs a new login failed exception for a given Identifiable.

      With null as its detail message. The cause is not initialized and may subsequently be initialized by a call to Throwable.initCause(Throwable).

      Parameters:
      object - the identifiable
    • LoginFailedException

      public LoginFailedException(Identifiable object, String message)
      Constructs a new login failed exception for a given Identifiable with the specified detail message. The cause is not initialized and may subsequently be initialized by a call to Throwable.initCause(Throwable).
      Parameters:
      object - the identifiable
      message - the detail message. The detail message is saved for later retrieval by the PersistenceException.getMessage() method.
    • LoginFailedException

      public LoginFailedException(Identifiable object, String message, Throwable cause)
      Constructs a new login failed exception for a given Identifiable with the specified detail message and cause.
      Parameters:
      object - the identifiable
      message - the detail message (which is saved for later retrieval by the PersistenceException.getMessage() method).
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted and indicates that the cause is nonexistent or unknown.)
    • LoginFailedException

      public LoginFailedException(Identifiable object, Throwable cause)
      Constructs a new login failed exception for a given Identifiable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for runtime exceptions that are little more than wrappers for other Throwables.
      Parameters:
      object - the identifiable
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted and indicates that the cause is nonexistent or unknown.)
    • LoginFailedException

      public LoginFailedException()
      Constructs a new login failed exception without a session and with null as its detail message. The cause is not initialized and may subsequently be initialized by a call to Throwable.initCause(Throwable).
    • LoginFailedException

      public LoginFailedException(String message)
      Constructs a new login failed exception without a session with the specified detail message. The cause is not initialized and may subsequently be initialized by a call to Throwable.initCause(Throwable).
      Parameters:
      message - the detail message. The detail message is saved for later retrieval by the PersistenceException.getMessage() method.
    • LoginFailedException

      public LoginFailedException(String message, Throwable cause)
      Constructs a new login failed exception without a session with the specified detail message and cause.

      Note that the detail message associated with cause is not automatically incorporated in this runtime exception's detail message.

      Parameters:
      message - the detail message (which is saved for later retrieval by the PersistenceException.getMessage() method).
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted and indicates that the cause is nonexistent or unknown.)
  • Method Details

    • getLogLevel

      public Logger.Level getLogLevel()

      Overridden to suppress logging, since a refused login is an expected exception.

      Specified by:
      getLogLevel in interface Loggable
      Returns:
      null