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

Class JID

source code

JID object. JID can be built from string, modified, compared, serialised into string.

Instance Methods [hide private]
 
__init__(self, jid=None, node='', domain='', resource='')
Constructor.
source code
 
getNode(self)
Return the node part of the JID
source code
 
setNode(self, node)
Set the node part of the JID to new value.
source code
 
getDomain(self)
Return the domain part of the JID
source code
 
setDomain(self, domain)
Set the domain part of the JID to new value.
source code
 
getResource(self)
Return the resource part of the JID
source code
 
setResource(self, resource)
Set the resource part of the JID to new value.
source code
 
getStripped(self)
Return the bare representation of JID.
source code
 
__eq__(self, other)
Compare the JID to another instance or to string for equality.
source code
 
__ne__(self, other)
Compare the JID to another instance or to string for non-equality.
source code
 
bareMatch(self, other)
Compare the node and domain parts of the JID's for equality.
source code
 
__str__(self, wresource=1)
Serialise JID into string.
source code
 
__hash__(self)
Produce hash of the JID, Allows to use JID objects as keys of the dictionary.
source code
Method Details [hide private]

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

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

setNode(self, node)

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

setResource(self, resource)

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

getStripped(self)

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