pyxmpp.jid.JID

Package pyxmpp :: Module jid :: Class JID |
[show private | hide private]
[frames | no frames]

## Type JID

    object --+
             |
            JID

JID.

JID objects are immutable. They are also cached for better performance.

Method Summary
| `__cmp__(self, other)`
| `__eq__(self, other)`
| `__hash__(self)`
| `__ne__(self, other)`
| ``__new__`(cls, node_or_jid, domain, resource, check)` Create a new JID object or take one from the cache. (Static method)
| `__repr__(self)`
| `__setattr__(self, name, value)`
| `__str__(self)`
| `__unicode__(self)`
| ``as_string`(self)` UTF-8 encoded JID representation.
| ``as_unicode`(self)` Unicode string JID representation.
| ``as_utf8`(self)` UTF-8 encoded JID representation.
| ``bare`(self)` Make bare JID made by removing resource from current `self`.
Inherited from object
| ``__init__`(...)` x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| ``__delattr__`(...)` x.__delattr__('name') <==> del x.name
| ``__getattribute__`(...)` x.__getattribute__('name') <==> x.name
| ``__reduce__`(...)` helper for pickle
| ``__reduce_ex__`(...)` helper for pickle

Instance Variable Summary
`member_descriptor` | `domain`: domain part of the JID
`member_descriptor` | `node`: node part of the JID
`member_descriptor` | `resource`: resource part of the JID

Class Variable Summary
`list` | `__slots__` = `['node', 'domain', 'resource', '__weakref__'...`
`WeakValueDictionary` | `cache` = `<WeakValueDictionary at 1081863372>`

Instance Method Details

### as_string(self) UTF-8 encoded JID representation. Deprecated Always use Unicode objects, or `as_utf8` if you really want. Returns: UTF-8 encoded JID.

### as_unicode(self) Unicode string JID representation. Returns: JID as Unicode string.

### as_utf8(self) UTF-8 encoded JID representation. Returns: UTF-8 encoded JID.

### bare(self) Make bare JID made by removing resource from current `self`. Returns: new JID object without resource part.

Static Method Details

### __new__(cls, node_or_jid=None, domain=None, resource=None, check=True) Create a new JID object or take one from the cache. Parameters: `node_or_jid` - node part of the JID, JID object to copy or Unicode representation of the JID. `domain` - domain part of the JID `resource` - resource part of the JID `check` - if `False` then JID is not checked for specifiaction compliance. Overrides: `__builtin__.object.__new__`

Instance Variable Details

    ### domain domain part of the JID Type: `member_descriptor` Value:
        <member 'domain' of 'JID' objects>

    ### node node part of the JID Type: `member_descriptor` Value:
        <member 'node' of 'JID' objects>

    ### resource resource part of the JID Type: `member_descriptor` Value:
        <member 'resource' of 'JID' objects>

Class Variable Details

    ### __slots__ Type: `list` Value:
        ['node', 'domain', 'resource', '__weakref__']

    ### cache Type: `WeakValueDictionary` Value:
        <WeakValueDictionary at 1081863372>