Package xmpp :: Module protocol :: Class JID
[show private | hide private]
[frames | no frames]

Class JID


JID object. JID can be built from string, modified, compared, serialised into string.
Method Summary
  __init__(self, jid, node, domain, resource)
Constructor.
  __eq__(self, other)
Compare the JID to another instance or to string for equality.
  __hash__(self)
Produce hash of the JID, Allows to use JID objects as keys of the dictionary.
  __ne__(self, other)
Compare the JID to another instance or to string for non-equality.
  __str__(self, wresource)
Serialise JID into string.
  bareMatch(self, other)
Compare the node and domain parts of the JID's for equality.
  getDomain(self)
Return the domain part of the JID
  getNode(self)
Return the node part of the JID
  getResource(self)
Return the resource part of the JID
  getStripped(self)
Return the bare representation of JID.
  setDomain(self, domain)
Set the domain part of the JID to new value.
  setNode(self, node)
Set the node part of the JID to new value.
  setResource(self, resource)
Set the resource part of the JID to new value.

Method Details

__init__(self, jid=None, node='', domain='', resource='')
(Constructor)

Constructor. JID can be specified as string (jid argument) or as separate parts. Examples: JID('node@domain/resource') JID(node='node',domain='domain.org')

__eq__(self, other)
(Equality operator)

Compare the JID to another instance or to string for equality.

__hash__(self)
(Hashing function)

Produce hash of the JID, Allows to use JID objects as keys of the dictionary.

__ne__(self, other)

Compare the JID to another instance or to string for non-equality.

__str__(self, wresource=1)
(Informal representation operator)

Serialise JID into string.

bareMatch(self, other)

Compare the node and domain parts of the JID's for equality.

getDomain(self)

Return the domain part of the JID

getNode(self)

Return the node part of the JID

getResource(self)

Return the resource part of the JID

getStripped(self)

Return the bare representation of JID. I.e. string value w/o resource.

setDomain(self, domain)

Set the domain part of the JID to new value.

setNode(self, node)

Set the node part of the JID to new value. Specify None to remove the node part.

setResource(self, resource)

Set the resource part of the JID to new value. Specify None to remove the resource part.

Generated by Epydoc 2.1 on Mon Mar 6 14:11:54 2006 http://epydoc.sf.net