Package tigase.util
Class JIDUtils
- java.lang.Object
-
- tigase.util.JIDUtils
-
@Deprecated public abstract class JIDUtils extends Object
Deprecated.replaced by tigase.xmpp.JIDJIDUtilsclass contains static methods for JIDUtils manipulation.
Created: Thu Jan 27 22:53:41 2005
- Version:
- $Rev$
- Author:
- Artur Hefczyc
-
-
Constructor Summary
Constructors Constructor Description JIDUtils()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringcheckNickName(String nickname)Deprecated.checkNickNamemethod checks whether given string is a valid nick name: not null, not zero length, doesn't contain invalid characters.static StringgetJID(String nick, String domain, String resource)Deprecated.getJIDmethod builds valid JIDUtils string from given nick name, domain and resource.static StringgetNodeHost(String jid)Deprecated.MethodgetNodeHostparses given JIDUtils and returns node domain part.static StringgetNodeHostIP(String jid)Deprecated.MethodgetNodeHostIPparses given JIDUtils for node domain part and then tries to resolve host IP address..static StringgetNodeID(String jid)Deprecated.MethodgetNodeIDcuts off resource JIDUtils part if exists and returns only node ID.static StringgetNodeID(String nick, String domain)Deprecated.This is static method to construct user ID from given JIDUtils parts.static StringgetNodeNick(String jid)Deprecated.MethodgetNodeNickparses given JIDUtils and returns node nick name or empty string if nick name could not be found.static StringgetNodeResource(String jid)Deprecated.MethodgetNodeIDparses given JIDUtils and returns resource part of given JIDUtils or empty string if there was no resource part.
-
-
-
Method Detail
-
checkNickName
public static final String checkNickName(String nickname)
Deprecated.checkNickNamemethod checks whether given string is a valid nick name: not null, not zero length, doesn't contain invalid characters.- Parameters:
nickname- aStringvalue of nick name to validate.- Returns:
- a
Stringvaluenullif nick name is correct otherwise text with description of the problem.
-
getJID
public static final String getJID(String nick, String domain, String resource)
Deprecated.getJIDmethod builds valid JIDUtils string from given nick name, domain and resource. It is aware of the fact that some elements might benulland then they are not included in JIDUtils.domainmusn't benullhowever.- Parameters:
nick- aStringvalue of JIDUtils's nick name.nullallowed.domain- aStringvalue of JIDUtils's domain name.nullnot allowed.resource- aStringvalue of JIDUtils's resource.- Returns:
- a
Stringvalue
-
getNodeHost
public static final String getNodeHost(String jid)
Deprecated.MethodgetNodeHostparses given JIDUtils and returns node domain part.- Parameters:
jid- aStringvalue of JIDUtils to parse.- Returns:
- a
Stringvalue of node domain part.
-
getNodeHostIP
public static final String getNodeHostIP(String jid) throws UnknownHostException
Deprecated.MethodgetNodeHostIPparses given JIDUtils for node domain part and then tries to resolve host IP address..- Parameters:
jid- aStringvalue of JIDUtils to parse.- Returns:
- a
Stringvalue of node domain IP address. - Throws:
UnknownHostException
-
getNodeID
public static final String getNodeID(String jid)
Deprecated.MethodgetNodeIDcuts off resource JIDUtils part if exists and returns only node ID.- Parameters:
jid- aStringvalue of JIDUtils to parse.- Returns:
- a
Stringvalue 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- aStringvalue of node part of JIDUtils.domain- aStringvalue of domain part of JIDUtils.- Returns:
-
getNodeNick
public static final String getNodeNick(String jid)
Deprecated.MethodgetNodeNickparses given JIDUtils and returns node nick name or empty string if nick name could not be found.- Parameters:
jid- aStringvalue of JIDUtils to parse.- Returns:
- a
Stringvalue of node nick name or empty string.
-
getNodeResource
public static final String getNodeResource(String jid)
Deprecated.MethodgetNodeIDparses given JIDUtils and returns resource part of given JIDUtils or empty string if there was no resource part.- Parameters:
jid- aStringvalue of JIDUtils to parse.- Returns:
- a
Stringvalue of node Resource or empty string.
-
-