28 lines
629 B
Java
28 lines
629 B
Java
package org.mercury_im.messenger.service;
|
|
|
|
import android.util.LongSparseArray;
|
|
|
|
import org.jivesoftware.smack.XMPPConnection;
|
|
|
|
public class XmppConnectionHolder {
|
|
|
|
private static XmppConnectionHolder INSTANCE;
|
|
|
|
private final LongSparseArray<XMPPConnection> connections = new LongSparseArray<>();
|
|
|
|
private XmppConnectionHolder() {
|
|
|
|
}
|
|
|
|
public static XmppConnectionHolder getInstance() {
|
|
if (INSTANCE == null) {
|
|
INSTANCE = new XmppConnectionHolder();
|
|
}
|
|
return INSTANCE;
|
|
}
|
|
|
|
public LongSparseArray<XMPPConnection> getConnections() {
|
|
return connections;
|
|
}
|
|
}
|