Class RedirectionServer

java.lang.Object
com.iizix.server.RedirectionServer

public class RedirectionServer extends Object
Class 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 Link icon

    Constructors
    Constructor
    Description
    RedirectionServer(String hostName, int port, boolean isSecure)
    Constructor.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    boolean
    Checks if two redirection server object are equal.
    Gets the host name or IP address of the redirection server.
    int
    Gets the port number for the redirection server.
    int
    Gets the real port to use for the redirection server.
    int
    Returns the hashCode.
    boolean
    Gets the flag for secure connection, i.e.
    Creates a string representation of the instance.

    Methods inherited from class java.lang.Object Link icon

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details Link icon

    • RedirectionServer Link icon

      public RedirectionServer(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:
      NullPointerException - If hostName is null.
      IllegalArgumentException - If port is not -1 or in range of 1-65535.
  • Method Details Link icon

    • getHostName Link icon

      public String getHostName()
      Gets the host name or IP address of the redirection server.
      Returns:
      the hostName.
    • getPort Link icon

      public int getPort()
      Gets the port number for the redirection server.
      Returns:
      the port, -1 for default.
    • getRealPort Link icon

      public int getRealPort()
      Gets the real port to use for the redirection server.
      Returns:
      The port number.
    • isSecure Link icon

      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 Link icon

      public String toString()
      Creates a string representation of the instance.
      Overrides:
      toString in class Object
      Returns:
      A String formatted as hostName[:port][,secure].
    • hashCode Link icon

      public int hashCode()
      Returns the hashCode.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code.
    • equals Link icon

      public boolean equals(Object obj)
      Checks if two redirection server object are equal.
      Overrides:
      equals in class Object
      Parameters:
      obj - The object to compare with.
      Returns:
      Equals flag.