Infinity.XmppManager¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
  | 
|
  | 
Properties¶
None
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
This signal is emitted whenever a new connection has been added to the   | 
|
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent  | 
r  | 
Class Details¶
- class Infinity.XmppManager(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
Infinity.XmppManageris an opaque data type. You should only access it via the public API functions.- classmethod new()¶
 - Returns:
 A new
Infinity.XmppManager.- Return type:
 
Creates a new xmpp manager.
- add_connection(connection)¶
 - Parameters:
 connection (
Infinity.XmppConnection) – AInfinity.XmppConnectionnot yet contained in self.
Adds the given connection to self so that it is found by
Infinity.XmppManager.lookup_connection_by_address(),Infinity.XmppManager.lookup_connection_by_hostname() andInfinity.XmppManager.contains_connection().
- contains_connection(connection)¶
 - Parameters:
 connection (
Infinity.XmppConnection) – AInfinity.XmppConnection.- Returns:
 - Return type:
 
Returns whether connection is contained in self.
- lookup_connection_by_address(address, port)¶
 - Parameters:
 address (
Infinity.IpAddress) – The remoteInfinity.IpAddressof the connection to look for.port (
int) – The remote port number of the connection to look for.
- Returns:
 A
Infinity.XmppConnectionwith the given address and port, orNoneif not found.- Return type:
 
Looks for a
Infinity.XmppConnectioncontained in self whose underlayingInfinity.TcpConnectionhas the given address and port set. ReturnsNoneif there is no such connection.This function may also return a closed connection. You can then attempt to reopen it, or remove it from the manager using
Infinity.XmppManager.remove_connection() when that fails.
- lookup_connection_by_hostname(hostname, service, srv)¶
 - Parameters:
 - Returns:
 A
Infinity.XmppConnectionwith the given hostname, service and srv, orNoneif not found.- Return type:
 
Looks for a
Infinity.XmppConnectioncontained in self whose underlayingInfinity.TcpConnectionhas aInfinity.NameResolverwith the given properties.This function may also return a closed connection. You can then attempt to reopen it, or remove it from the manager using
Infinity.XmppManager.remove_connection() when that fails.
- remove_connection(connection)¶
 - Parameters:
 connection (
Infinity.XmppConnection) – AInfinity.XmppConnectioncontained in self.
Removes the given connection from self.
- do_connection_added(connection) virtual¶
 - Parameters:
 connection (
Infinity.XmppConnection) –
Default signal handler for the
Infinity.XmppManager::connection-addedsignal.
- do_connection_removed(connection, replaced_by) virtual¶
 - Parameters:
 connection (
Infinity.XmppConnection) –replaced_by (
Infinity.XmppConnection) –
Default signal handler for the
Infinity.XmppManager::connection-removedsignal.
Signal Details¶
- Infinity.XmppManager.signals.connection_added(xmpp_manager, connection)¶
 - Signal Name:
 connection-added- Flags:
 - Parameters:
 xmpp_manager (
Infinity.XmppManager) – The object which received the signalconnection (
Infinity.XmppConnection) – TheInfinity.XmppConnectionthat was added to xmpp_manager.
This signal is emitted whenever a new connection has been added to the
Infinity.XmppManager, viaInfinity.XmppManager.add_connection().
- Infinity.XmppManager.signals.connection_removed(xmpp_manager, object, p0)¶
 - Signal Name:
 connection-removed- Flags:
 - Parameters:
 xmpp_manager (
Infinity.XmppManager) – The object which received the signalobject (
Infinity.XmppConnection) –p0 (
Infinity.XmppConnection) –