Package com.iizix.server
Class RedirectionServer
- java.lang.Object
- com.iizix.server.RedirectionServer
 
- public class RedirectionServer extends java.lang.ObjectClass used to specify a redirection server when the load balancer is enabled and a client connects to a server that should not process the request.- Author:
- Christopher Mindus
 
- Constructor Summary- Constructors - Constructor - Description - RedirectionServer(java.lang.String hostName, int port, boolean isSecure)Constructor.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - boolean- equals(java.lang.Object obj)Checks if two redirection server object are equal.- java.lang.String- getHostName()Gets the host name or IP address of the redirection server.- int- getPort()Gets the port number for the redirection server.- int- getRealPort()Gets the real port to use for the redirection server.- int- hashCode()Returns the hashCode.- boolean- isSecure()Gets the flag for secure connection, i.e.- java.lang.String- toString()Creates a string representation of the instance.
 
- Constructor Detail- RedirectionServer- public RedirectionServer(java.lang.String hostName, int port, boolean isSecure)Constructor.- Parameters:
- hostName- The host name or IP address of the redirection server.
- port- The port number for the redirection server, -1 for default.
- isSecure- Flag for secure connection, i.e. if SSL/TLS should be used.
- Throws:
- java.lang.NullPointerException- If- hostNameis null.
- java.lang.IllegalArgumentException- If port is not -1 or in range of 1-65535.
 
 
 - Method Detail- getHostName- public java.lang.String getHostName() Gets the host name or IP address of the redirection server.- Returns:
- the hostName.
 
 - getPort- public int getPort() Gets the port number for the redirection server.- Returns:
- the port, -1 for default.
 
 - getRealPort- public int getRealPort() Gets the real port to use for the redirection server.- Returns:
- The port number.
 
 - isSecure- public boolean isSecure() Gets the flag for secure connection, i.e. if SSL/TLS should be used.- Returns:
- true if connection should use SSL/TLS, false otherwise.
 
 - toString- public java.lang.String toString() Creates a string representation of the instance.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- A String formatted as hostName[:port][,secure].
 
 - hashCode- public int hashCode() Returns the hashCode.- Overrides:
- hashCodein class- java.lang.Object
- Returns:
- The hash code.
 
 - equals- public boolean equals(java.lang.Object obj) Checks if two redirection server object are equal.- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- obj- The object to compare with.
- Returns:
- Equals flag.