org.eclipse.ecf.provider.xmpp.identity
Class XMPPID

java.lang.Object
  extended by org.eclipse.ecf.core.identity.BaseID
      extended by org.eclipse.ecf.provider.xmpp.identity.XMPPID
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, java.security.Principal, org.eclipse.core.runtime.IAdaptable, ID, IFQID, IChatID
Direct Known Subclasses:
XMPPSID

public class XMPPID
extends BaseID
implements IChatID, IFQID

See Also:
Serialized Form

Field Summary
protected static java.util.Hashtable escapeTable
           
protected  java.lang.String hostname
           
static java.lang.String PATH_DELIMITER
           
protected  int port
           
static char PORT_DELIMITER
           
protected  java.lang.String resourcename
           
static char USER_HOST_DELIMITER
           
protected  java.lang.String username
           
 
Fields inherited from class org.eclipse.ecf.core.identity.BaseID
namespace
 
Constructor Summary
XMPPID(Namespace namespace, java.lang.String unamehost)
           
 
Method Summary
 java.lang.Object getAdapter(java.lang.Class clazz)
           
 java.lang.String getFQName()
          Get the fully qualified name.
 java.lang.String getHostname()
          Get hostname for this IChatID
 java.lang.String getNodename()
           
 int getPort()
           
 java.lang.String getResourceName()
          Get resource name.
 java.lang.String getUsername()
          Get username for this IChatID
 java.lang.String getUsernameAtHost()
           
protected  int namespaceCompareTo(BaseID o)
          Called by Namespace.getCompareToForObject(BaseID, BaseID).
protected  boolean namespaceEquals(BaseID o)
          Called by Namespace.testIDEquals(BaseID, BaseID).
protected  java.lang.String namespaceGetName()
          Called by Namespace.getNameForID(BaseID).
protected  int namespaceHashCode()
          Called by Namespace.getHashCodeForID(BaseID).
protected  java.lang.String namespaceToExternalForm()
          Called by Namespace.toExternalForm(BaseID).
 void setResourceName(java.lang.String resourceName)
           
 java.lang.String toString()
           
static java.lang.String unfixEscapeInNode(java.lang.String node)
           
 
Methods inherited from class org.eclipse.ecf.core.identity.BaseID
compareTo, equals, getName, getNamespace, hashCode, toExternalForm
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

USER_HOST_DELIMITER

public static final char USER_HOST_DELIMITER
See Also:
Constant Field Values

PORT_DELIMITER

public static final char PORT_DELIMITER
See Also:
Constant Field Values

PATH_DELIMITER

public static final java.lang.String PATH_DELIMITER
See Also:
Constant Field Values

escapeTable

protected static java.util.Hashtable escapeTable

username

protected java.lang.String username

hostname

protected java.lang.String hostname

resourcename

protected java.lang.String resourcename

port

protected int port
Constructor Detail

XMPPID

public XMPPID(Namespace namespace,
              java.lang.String unamehost)
       throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException
Method Detail

unfixEscapeInNode

public static java.lang.String unfixEscapeInNode(java.lang.String node)

namespaceCompareTo

protected int namespaceCompareTo(BaseID o)
Description copied from class: BaseID
Called by Namespace.getCompareToForObject(BaseID, BaseID).

Specified by:
namespaceCompareTo in class BaseID
Parameters:
o - the other ID to compare to. Will not be null.
Returns:
the appropriate value as per Comparable contract.

namespaceEquals

protected boolean namespaceEquals(BaseID o)
Description copied from class: BaseID
Called by Namespace.testIDEquals(BaseID, BaseID).

Specified by:
namespaceEquals in class BaseID
Parameters:
o - the other ID to test against. May be null.
Returns:
true if this ID is equal to the given ID. false otherwise.

namespaceGetName

protected java.lang.String namespaceGetName()
Description copied from class: BaseID
Called by Namespace.getNameForID(BaseID).

Specified by:
namespaceGetName in class BaseID
Returns:
String name for this ID. Must not be null. Value returned should be unique within this Namespace.

namespaceHashCode

protected int namespaceHashCode()
Description copied from class: BaseID
Called by Namespace.getHashCodeForID(BaseID).

Specified by:
namespaceHashCode in class BaseID
Returns:
int hashCode for this ID. Returned value must be unique within this process.

getNodename

public java.lang.String getNodename()

namespaceToExternalForm

protected java.lang.String namespaceToExternalForm()
Description copied from class: BaseID
Called by Namespace.toExternalForm(BaseID).

Overrides:
namespaceToExternalForm in class BaseID
Returns:
String that represents this ID. Default implementation is to return
 namespace.getScheme() + Namespace.SCHEME_SEPARATOR + namespaceGetName();
 

getUsername

public java.lang.String getUsername()
Description copied from interface: IChatID
Get username for this IChatID

Specified by:
getUsername in interface IChatID
Returns:
String username for the implementing IChatID. May return null.

getHostname

public java.lang.String getHostname()
Description copied from interface: IChatID
Get hostname for this IChatID

Specified by:
getHostname in interface IChatID
Returns:
String hostname for the implementing IChatID. May return null.

getResourceName

public java.lang.String getResourceName()
Description copied from interface: IFQID
Get resource name. May return null.

Specified by:
getResourceName in interface IFQID
Returns:
String that is the resource for this IFQID. May be null.

setResourceName

public void setResourceName(java.lang.String resourceName)

getPort

public int getPort()

getUsernameAtHost

public java.lang.String getUsernameAtHost()

getFQName

public java.lang.String getFQName()
Description copied from interface: IFQID
Get the fully qualified name. Will not return null. The result may be the same as ID.getName(), or may include additional information. The result must be longer than or equal to ID.getName().

Specified by:
getFQName in interface IFQID
Returns:
String that is the fully qualified name. Will not return null. The result may be the same as ID.getName(), or may include additional information. The result must be longer than or equal to ID.getName().

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object

getAdapter

public java.lang.Object getAdapter(java.lang.Class clazz)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class BaseID