完善jmeter插件
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package net.xmeter.samplers;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import cn.wildfirechat.client.IMClient;
|
||||
|
||||
public class ClientManager {
|
||||
private ConcurrentHashMap<String, IMClient> clients = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
private static ClientManager clientManager = new ClientManager();
|
||||
private ClientManager() {
|
||||
|
||||
}
|
||||
|
||||
public static synchronized ClientManager getInstance() {
|
||||
return clientManager;
|
||||
}
|
||||
|
||||
public void putClient(String key, IMClient client) {
|
||||
clients.put(key, client);
|
||||
}
|
||||
|
||||
public IMClient getClient(String key) {
|
||||
return this.clients.get(key);
|
||||
}
|
||||
|
||||
|
||||
public void removeClient(String key) {
|
||||
this.clients.remove(key);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user