Package com.jk.core.exceptions
Class JKServerDownException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.jk.core.exceptions.JKException
com.jk.core.exceptions.JKServerDownException
- All Implemented Interfaces:
 Serializable
- Direct Known Subclasses:
 JKDatabaseDownException
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 Summary
ConstructorsConstructorDescriptionJKServerDownException(Exception ex, String host, int port) This method constructs aJKServerDownExceptionwith a specific error specifying the host name and port number to the server associated with this exception.JKServerDownException(Throwable cause) This method constructs aJKServerDownExceptionwith a cause. - 
Method Summary
Modifier and TypeMethodDescriptiongetHost()This method gets the host name of the server associated with this exception.intgetPort()This method gets the port number of the server associated with this exception.voidThis method sets the host name to the server associated with this exception.voidsetPort(int port) This method sets the port number to the server associated with this exception.Methods inherited from class com.jk.core.exceptions.JKException
isLogged, setLoggedMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString 
- 
Constructor Details
- 
JKServerDownException
This method constructs aJKServerDownExceptionwith 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
This method constructs aJKServerDownExceptionwith a cause.- Parameters:
 cause- Specifies the cause of this exception.
 
 - 
 - 
Method Details
- 
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
- Overrides:
 getMessagein classThrowable- Returns:
 - the detail message string of this 
Throwableinstance(which may benull) 
 - 
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
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.
 
 -