com.ibm.websphere.naming

Interface HostnameNormalizer



  • public interface HostnameNormalizer
    Normalize hostname for consistent usage within the WebSphere NameSpace. WebSphere provides a default implementation of this interface which should be satisfactory for most environments. For an environment requiring an alternate normalization routine it is possible to configure your own implementation. See JndiHelper.normalizeHostname(Hashtable env) for details.
    See Also:
    JndiHelper.normalizeHostname(Hashtable env)
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static boolean ESCAPE_DOTS_FALSE
      Constant to be used for the EscapeDots parameter of the normalizeHostname methods indicating that no special processing is needed for dots.
      static boolean ESCAPE_DOTS_TRUE
      Constant to be used for the EscapeDots parameter of the normalizeHostname methods indicating that dots need to be escaped.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String normalizeHostname(boolean escapeDots)
      Apply a normalization algorithm to the local hostname.
      java.lang.String normalizeHostname(boolean escapeDots, java.net.InetAddress ipAddress)
      Apply a normalization algorithm to the hostname of the host represented by the ipAddress parameter.
      java.lang.String normalizeHostname(boolean escapeDots, java.lang.String hostname)
      Apply a normalization algorithm to the hostname parameter.
    • Field Detail

      • ESCAPE_DOTS_TRUE

        static final boolean ESCAPE_DOTS_TRUE
        Constant to be used for the EscapeDots parameter of the normalizeHostname methods indicating that dots need to be escaped. Its value is true.
        See Also:
        Constant Field Values
      • ESCAPE_DOTS_FALSE

        static final boolean ESCAPE_DOTS_FALSE
        Constant to be used for the EscapeDots parameter of the normalizeHostname methods indicating that no special processing is needed for dots. Its value is false.
        See Also:
        Constant Field Values
    • Method Detail

      • normalizeHostname

        java.lang.String normalizeHostname(boolean escapeDots)
                                           throws javax.naming.NamingException
        Apply a normalization algorithm to the local hostname.

        Parameters:
        escapeDots - boolean indicating whether dots (".") in the hostname should be prepended with the escape character ("\"). Escaping dots is necessary for names that follow INS syntax rules.
        • ESCAPE_DOTS_TRUE - prepend dots with escape character.
        • ESCAPE_DOTS_FALSE - no special handling necessary for dots.
        Returns:
        String containing the normalized form of the local hostname.
        Throws:
        javax.naming.NamingException - the explanation of exception should indicate the cause.
      • normalizeHostname

        java.lang.String normalizeHostname(boolean escapeDots,
                                         java.lang.String hostname)
                                           throws javax.naming.NamingException
        Apply a normalization algorithm to the hostname parameter.

        Parameters:
        escapeDots - boolean indicating whether dots (".") in the hostname should be prepended with the escape character ("\"). Escaping dots is necessary for names that follow INS syntax rules.
        • ESCAPE_DOTS_TRUE - prepend dots with escape character
        • ESCAPE_DOTS_FALSE - no special handling necessary for dots
        hostname - String containing the hostname to be normalized.
        Returns:
        String containing the normalized form of the input hostname.
        Throws:
        javax.naming.NamingException - the explanation of exception should indicate the cause.
      • normalizeHostname

        java.lang.String normalizeHostname(boolean escapeDots,
                                         java.net.InetAddress ipAddress)
                                           throws javax.naming.NamingException
        Apply a normalization algorithm to the hostname of the host represented by the ipAddress parameter.

        Parameters:
        escapeDots - boolean indicating whether dots (".") in the hostname should be prepended with the escape character ("\"). Escaping dots is necessary for names that follow INS syntax rules.
        • ESCAPE_DOTS_TRUE - prepend dots with escape character
        • ESCAPE_DOTS_FALSE - no special handling necessary for dots
        ipAddress - java.net.InetAddress representing the hostname to be normalized.
        Returns:
        String containing the normalized form of the hostname for the host represented by the input ipAddress.
        Throws:
        javax.naming.NamingException - the explanation of exception should indicate the cause.
IBM WebSphere Application ServerTM
Release 8.5