Home | Trees | Index | Help |
|
---|
|
Jabber external component ("jabber:component:accept" protocol) interface implementation.
Override this class to build your components.
Method Summary | |
---|---|
Initialize a Component object. | |
Handle successful authentication event. | |
Handle successful authorization event. | |
Establish a connection with the server. | |
Handle stream connection event. | |
Get disco#info data for a node. | |
Get disco#items data for a node. | |
Disconnect from the server. | |
Handle stream disconnection (connection closed by peer) event. | |
pyxmpp.jabberd.ComponentStream |
Get the stream of the component in a safe way. |
Do some "housekeeping" work like <iq/> result expiration. | |
Simple 'main loop' for a component. | |
Register a feature to be announced by Service Discovery. | |
socket.socket |
Get the socket of the connection to the server. |
Handle stream closure event. | |
Handle stream creation event. | |
Handle a stream error received. | |
Handle a stream state change. | |
Unregister a feature to be announced by Service Discovery. |
Instance Variable Summary | |
---|---|
str |
disco_category : disco category to be used to create
disco_identity . |
pyxmpp.jabber.DiscoIdentity |
disco_identity : disco identity (part of disco info) announced by
the component. |
pyxmpp.jabber.DiscoInfo |
disco_info : disco info announced by the component. |
pyxmpp.jabber.DiscoItems |
disco_items : disco items announced by the component. |
str |
disco_type : disco type to be used to create disco_identity . |
pyxmpp.JID |
jid : component JID (should contain only the domain part). |
int |
keepalive : keepalive interval for the stream. |
int |
port : port number on the server to which the commonent will
connect. |
unicode |
secret : the authentication secret. |
unicode |
server : server to which the commonent will connect. |
pyxmpp.jabberd.ComponentStream |
stream : the XMPP stream object for the active connection
or None if no connection is active. |
Method Details |
---|
__init__(self,
jid=None,
secret=None,
server=None,
port=5347,
disco_name=u'PyXMPP based component',
disco_category=u'x-service',
disco_type=u'x-unknown',
keepalive=0)
Initialize a |
authenticated(self)Handle successful authentication event. A good place to register stanza handlers and disco features. [should be overriden in derived classes] By default: set disco#info and disco#items handlers. |
authorized(self)Handle successful authorization event. |
connect(self)Establish a connection with the server. Set
|
connected(self)Handle stream connection event. [may be overriden in derived classes] By default: do nothing. |
disco_get_info(self, node, iq)Get disco#info data for a node. [may be overriden in derived classes] By default: return
|
disco_get_items(self, node, iq)Get disco#items data for a node. [may be overriden in derived classes] By default: return
|
disconnect(self)Disconnect from the server. |
disconnected(self)Handle stream disconnection (connection closed by peer) event. [may be overriden in derived classes] By default: do nothing. |
get_stream(self)Get the stream of the component in a safe way.
|
idle(self)Do some "housekeeping" work like <iq/> result expiration. Should be called on a regular basis, usually when the component is idle. |
loop(self, timeout=1)Simple 'main loop' for a component. This usually will be replaced by something more sophisticated. E.g. handling of other input sources. |
register_feature(self, feature_name)Register a feature to be announced by Service Discovery.
|
socket(self)Get the socket of the connection to the server.
|
stream_closed(self, stream)Handle stream closure event. [may be overriden in derived classes] By default: do nothing.
|
stream_created(self, stream)Handle stream creation event. [may be overriden in derived classes] By default: do nothing.
|
stream_error(self, err)Handle a stream error received. [may be overriden in derived classes] By default: just log it. The stream will be closed anyway.
|
stream_state_changed(self, state, arg)Handle a stream state change. [may be overriden in derived classes] By default: do nothing.
|
unregister_feature(self, feature_name)Unregister a feature to be announced by Service Discovery.
|
Instance Variable Details |
---|
disco_categorydisco category to be used to createdisco_identity .
|
disco_identitydisco identity (part of disco info) announced by the component. Created when a stream is connected. |
disco_infodisco info announced by the component. Created when a stream is connected.
|
disco_itemsdisco items announced by the component. Created when a stream is connected.
|
disco_typedisco type to be used to createdisco_identity .
|
jidcomponent JID (should contain only the domain part).
|
keepalivekeepalive interval for the stream.
|
portport number on the server to which the commonent will connect.
|
secretthe authentication secret.
|
serverserver to which the commonent will connect.
|
streamthe XMPP stream object for the active connection orNone if no connection is active. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 26 17:57:40 2005 | http://epydoc.sf.net |