Class JKServerDownException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JKDatabaseDownException

public class JKServerDownException extends JKException
This class represents exception thrown to indicate a server is unavailable or down.

This exception is a subclass of JKException.

This class should be used to represent situations where data access a client is unable to establish a connection to a server due to its unavailability.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
See Also:
  • Constructor Details

    • JKServerDownException

      public JKServerDownException(Exception ex, String host, int port)
      This method constructs a JKServerDownException with a specific error specifying the host name and port number to the server associated with this exception.
      Parameters:
      ex - Specifies the error associated with this exception.
      host - Specifies the server host name.
      port - Specifies the server port number.
    • JKServerDownException

      public JKServerDownException(Throwable cause)
      This method constructs a JKServerDownException with a cause.
      Parameters:
      cause - Specifies the cause of this exception.
  • Method Details

    • getHost

      public String getHost()
      This method gets the host name of the server associated with this exception.
      Returns:
      the host name of the server associated with this exception.
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
      Returns:
      the detail message string of this Throwable instance(which may be null)
    • getPort

      public int getPort()
      This method gets the port number of the server associated with this exception.
      Returns:
      the port number of the server associated with this exception.
    • setHost

      public void setHost(String host)
      This method sets the host name to the server associated with this exception.
      Parameters:
      host - Specifies the new host name to the server associated with this exception.
    • setPort

      public void setPort(int port)
      This method sets the port number to the server associated with this exception.
      Parameters:
      port - Specifies the new port number to the server associated with this exception.