Code example for ConcurrentLinkedQueue

Methods: remove

0
		return instance;
	} 
 
	@Override 
	public void onClose(int closeCode, String message) {
		sSocketQueue.remove(this);
	} 
 
	@Override 
	public void onOpen(Connection connection) {
		this.mConnection = connection;
 
		sSocketQueue.add(this);
	} 
 
	@Override 
	public void onMessage(String data) {
		for (AlertWebSocket socket : sSocketQueue) {
			try { 
				socket.mConnection.sendMessage(data);
Experience pair programming with AI  Get Codota for Java