public void newMessage(List<Object> data) {
		
	    for (Object socket_message : data)
	    {
	        WebSocketRailsEvent event = new WebSocketRailsEvent(socket_message);
	        
	        if (event.isResult())
	        {
	            if (queue.get(event.getId()) != null)
	            {
	                queue.get(event.getId()).runCallbacks(event.isSuccess(), event.getData());
	                queue.remove(event.getId());
	            }
	        } else if (event.isChannel()) {
	            dispatchChannel(event);
	        } else if (event.isPing()) {
	            pong();
	        } else {
	            dispatch(event);
	        }
	        
	        if ("connecting".equals(state) && "client_connected".equals(event.getName()))
	            connectionEstablished(event.getData());
	    }		
	}