mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +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:
parent
a42e3c2742
commit
7eba4a484b
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue