Package com.iizix.test.client
Class DestinationServer
java.lang.Object
com.iizix.test.client.DestinationServer
The destination server to contact. This class is not thread safe.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- DestinationServer- (String hostName, int port, boolean isSecure, boolean isRedirectionAllowed) Constructor.
- Method SummaryModifier and TypeMethodDescription- booleanChecks if two destination server object are equal.Gets the server host name.- int- getPort()Gets the port of the server.- int- hashCode()Returns the hashCode.- booleanChecks if it's the default port.- booleanReturns whether redirection to another server is allowed.- boolean- isSecure()Gets if SSL is used or not.- toString()Creates a string representation of the instance.
- Constructor Details- DestinationServerConstructor.- Parameters:
- hostName- The server host name.
- port- Port number, -1 for default (80 for non-secure, 443 for secure).
- isSecure- Flag for server secure.
- isRedirectionAllowed- Flag for redirection allowed.
- Throws:
- NullPointerException- If- hostNameis null.
- IllegalArgumentException- If port is not -1 or in range of 1-65535.
 
 
- Method Details- getHostNameGets the server host name.- Returns:
- The host name.
 
- isDefaultPortpublic boolean isDefaultPort()Checks if it's the default port.- Returns:
- true if port is -1 or port is 80 and it's not secure, or 443 and it's secure, false otherwise.
 
- getPortpublic int getPort()Gets the port of the server.- Returns:
- The port, where the value -1 for default is changed to 80 for non-secure, or 443 for secure.
 
- isSecurepublic boolean isSecure()Gets if SSL is used or not.- Returns:
- The isSecure flag.
 
- isRedirectionAllowedpublic boolean isRedirectionAllowed()Returns whether redirection to another server is allowed.- Returns:
- The isRedirectionAllowed flag.
 
- toStringCreates a string representation of the instance.
- hashCodepublic int hashCode()Returns the hashCode.
- equalsChecks if two destination server object are equal.