tigase.util
Class JIDUtils

java.lang.Object
  extended by tigase.util.JIDUtils

Deprecated. replaced by tigase.xmpp.JID

@Deprecated
public abstract class JIDUtils
extends Object

JIDUtils class contains static methods for JIDUtils manipulation.

Created: Thu Jan 27 22:53:41 2005

Version:
$Rev$
Author:
Artur Hefczyc

Constructor Summary
JIDUtils()
          Deprecated.  
 
Method Summary
static 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.
static String getJID(String nick, String domain, String resource)
          Deprecated. getJID method builds valid JIDUtils string from given nick name, domain and resource.
static String getNodeHost(String jid)
          Deprecated. Method getNodeHost parses given JIDUtils and returns node domain part.
static String getNodeHostIP(String jid)
          Deprecated. Method getNodeHostIP parses given JIDUtils for node domain part and then tries to resolve host IP address..
static String getNodeID(String jid)
          Deprecated. Method getNodeID cuts off resource JIDUtils part if exists and returns only node ID.
static String getNodeID(String nick, String domain)
          Deprecated. This is static method to construct user ID from given JIDUtils parts.
static 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.
static 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JIDUtils

public JIDUtils()
Deprecated. 
Method Detail

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.

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.

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

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.

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:

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

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.


Copyright © 2013 Tigase. All Rights Reserved.