1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-23 11:07:57 +01:00

Adds static init - Makes the disco feature available by default on every connection

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2182 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2003-12-19 17:59:55 +00:00 committed by gdombiak
parent a42e3c2742
commit 7eba4a484b

View file

@ -77,6 +77,15 @@ public class ServiceDiscoveryManager {
private XMPPConnection connection;
private List features = new ArrayList();
// Create a new ServiceDiscoveryManager on every established connection
static {
XMPPConnection.addConnectionListener(new ConnectionEstablishedListener() {
public void connectionEstablished(XMPPConnection connection) {
new ServiceDiscoveryManager(connection);
}
});
}
/**
* Creates a new ServiceDiscoveryManager for a given XMPPConnection. This means that the
* service manager will respond to any service discovery request that the connection may