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, IChatID
Direct Known Subclasses:
XMPPSID

public class XMPPID
extends BaseID
implements IChatID

See Also:
Serialized Form

Field Summary
static char PATH_DELIMITER
           
static char PORT_DELIMITER
           
static char USER_HOST_DELIMITER
           
 
Fields inherited from class org.eclipse.ecf.core.identity.BaseID
namespace
 
Constructor Summary
XMPPID(Namespace namespace, java.lang.String unamehost)
           
 
Method Summary
protected static java.lang.String fixEscape(java.lang.String src)
           
 java.lang.Object getAdapter(java.lang.Class clazz)
           
 java.lang.String getFQName()
           
 java.lang.String getHostname()
          Get hostname for this IChatID
 int getPort()
           
 java.lang.String getResourceName()
           
 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).
 java.lang.String toString()
           
 
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 char PATH_DELIMITER
See Also:
Constant Field Values
Constructor Detail

XMPPID

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

fixEscape

protected static java.lang.String fixEscape(java.lang.String src)

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.

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()

getPort

public int getPort()

getUsernameAtHost

public java.lang.String getUsernameAtHost()

getFQName

public java.lang.String getFQName()

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