Package tigase.util

Class JIDUtils


  • @Deprecated
    public abstract class JIDUtils
    extends Object
    Deprecated.
    replaced by tigase.xmpp.JID
    JIDUtils class contains static methods for JIDUtils manipulation.

    Created: Thu Jan 27 22:53:41 2005

    Version:
    $Rev$
    Author:
    Artur Hefczyc
    • Constructor Detail

      • JIDUtils

        public JIDUtils()
        Deprecated.
    • Method Detail

      • checkNickName

        public static final String checkNickName​(String nickname)
        Deprecated.
        checkNickName method checks whether given string is a valid nick name: not null, not zero length, doesn't contain invalid characters.
        Parameters:
        nickname - a String value of nick name to validate.
        Returns:
        a String value null if nick name is correct otherwise text with description of the problem.
      • getJID

        public static final String getJID​(String nick,
                                          String domain,
                                          String resource)
        Deprecated.
        getJID method builds valid JIDUtils string from given nick name, domain and resource. It is aware of the fact that some elements might be null and then they are not included in JIDUtils. domain musn't be null however.
        Parameters:
        nick - a String value of JIDUtils's nick name. null allowed.
        domain - a String value of JIDUtils's domain name. null not allowed.
        resource - a String value of JIDUtils's resource.
        Returns:
        a String value
      • getNodeHost

        public static final String getNodeHost​(String jid)
        Deprecated.
        Method getNodeHost parses given JIDUtils and returns node domain part.
        Parameters:
        jid - a String value of JIDUtils to parse.
        Returns:
        a String value of node domain part.
      • getNodeHostIP

        public static final String getNodeHostIP​(String jid)
                                          throws UnknownHostException
        Deprecated.
        Method getNodeHostIP parses given JIDUtils for node domain part and then tries to resolve host IP address..
        Parameters:
        jid - a String value of JIDUtils to parse.
        Returns:
        a String value of node domain IP address.
        Throws:
        UnknownHostException
      • getNodeID

        public static final String getNodeID​(String jid)
        Deprecated.
        Method getNodeID cuts off resource JIDUtils part if exists and returns only node ID.
        Parameters:
        jid - a String value of JIDUtils to parse.
        Returns:
        a String value of node ID without resource part.
      • getNodeID

        public static final String getNodeID​(String nick,
                                             String domain)
        Deprecated.
        This is static method to construct user ID from given JIDUtils parts. This is not user session ID (JIDUtils), this is just user ID - JIDUtils without resource part.
        Parameters:
        nick - a String value of node part of JIDUtils.
        domain - a String value of domain part of JIDUtils.
        Returns:
      • getNodeNick

        public static final String getNodeNick​(String jid)
        Deprecated.
        Method getNodeNick parses given JIDUtils and returns node nick name or empty string if nick name could not be found.
        Parameters:
        jid - a String value of JIDUtils to parse.
        Returns:
        a String value of node nick name or empty string.
      • getNodeResource

        public static final String getNodeResource​(String jid)
        Deprecated.
        Method getNodeID parses given JIDUtils and returns resource part of given JIDUtils or empty string if there was no resource part.
        Parameters:
        jid - a String value of JIDUtils to parse.
        Returns:
        a String value of node Resource or empty string.