@Override public void onAlert(IDeviceEventContext context, IDeviceAlert alert) throws SiteWhereException { SolrInputDocument document = SiteWhereSolrFactory.createDocumentFromAlert(alert); try { queue.put(document); } catch (InterruptedException e) { throw new SiteWhereException("Interrupted during indexing.", e); } }
@Override public void onAlertNotFiltered(IDeviceAlert alert) throws SiteWhereException { SolrInputDocument document = SiteWhereSolrFactory.createDocumentFromAlert(alert); try { queue.put(document); } catch (InterruptedException e) { throw new SiteWhereException("Interrupted during indexing.", e); } }