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.XmppManager
is 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.XmppConnection
not 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.IpAddress
of the connection to look for.port (
int
) – The remote port number of the connection to look for.
- Returns:
A
Infinity.XmppConnection
with the given address and port, orNone
if not found.- Return type:
Looks for a
Infinity.XmppConnection
contained in self whose underlayingInfinity.TcpConnection
has the given address and port set. ReturnsNone
if 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.XmppConnection
with the given hostname, service and srv, orNone
if not found.- Return type:
Looks for a
Infinity.XmppConnection
contained in self whose underlayingInfinity.TcpConnection
has aInfinity.NameResolver
with 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.XmppConnection
contained in self.
Removes the given connection from self.
- do_connection_added(connection) virtual¶
- Parameters:
connection (
Infinity.XmppConnection
) –
- do_connection_removed(connection, replaced_by) virtual¶
- Parameters:
connection (
Infinity.XmppConnection
) –replaced_by (
Infinity.XmppConnection
) –
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.XmppConnection
that 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
) –