Package xmpp :: Module client :: Class Component
[show private | hide private]
[frames | no frames]

Class Component

CommonClient --+
               |
              Component


Component class. The only difference from CommonClient is ability to perform component authentication.
Method Summary
  __init__(self, server, port, typ, debug, domains, sasl, bind, route)
Init function for Components.
  auth(self, name, password, dup)
Authenticate component "name" with password "password".
  connect(self, server, proxy)
This will connect to the server, and if the features tag is found then set the namespace to be jabber:client as that is required for jabberd2.
  dobind(self, sasl)
    Inherited from CommonClient
  disconnected(self)
Called on disconnection.
  DisconnectHandler(self)
Default disconnect handler.
  event(self, eventName, args)
Default event handler.
  isConnected(self)
Returns connection state.
  reconnectAndReauth(self)
Example of reconnection method.
  RegisterDisconnectHandler(self, handler)
Register handler that will be called on disconnect.
  UnregisterDisconnectHandler(self, handler)
Unregister handler that is called on disconnect.

Method Details

__init__(self, server, port=5347, typ=None, debug=['always', 'nodebuilder'], domains=None, sasl=0, bind=0, route=0)
(Constructor)

Init function for Components. As components use a different auth mechanism which includes the namespace of the component. Jabberd1.4 and Ejabberd use the default namespace then for all client messages. Jabberd2 uses jabber:client. 'server' argument is a server name that you are connecting to (f.e. "localhost"). 'port' can be specified if 'server' resolves to correct IP. If it is not then you'll need to specify IP and port while calling "connect()".
Overrides:
xmpp.client.CommonClient.__init__

auth(self, name, password, dup=None)

Authenticate component "name" with password "password".

connect(self, server=None, proxy=None)

This will connect to the server, and if the features tag is found then set the namespace to be jabber:client as that is required for jabberd2. 'server' and 'proxy' arguments have the same meaning as in xmpp.Client.connect()
Overrides:
xmpp.client.CommonClient.connect

Generated by Epydoc 2.1 on Thu Oct 5 23:57:42 2006 http://epydoc.sf.net