@@ -0,0 +1,663 @@
+package com.doctor.esper.common;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport com.espertech.esper.client.EPStatement;%0Aimport com.espertech.esper.client.EventBean;%0Aimport com.espertech.esper.client.SafeIterator;%0A%0A/**%0A * @author docotr%0A *%0A * @time 2015%E5%B9%B46%E6%9C%881%E6%97%A5 %E4%B8%8B%E5%8D%884:28:33%0A */%0Apublic enum EsperUtil %7B%0A%09;%0A%09static List%3CEventBean%3E get(EPStatement epStatement) %7B%0A%09%09List%3CEventBean%3E list = new ArrayList%3C%3E();%0A%09%09SafeIterator%3CEventBean%3E safeIterator = epStatement.safeIterator();%0A%09%09try %7B%0A%09%09%09while (safeIterator.hasNext()) %7B%0A%09%09%09%09list.add(safeIterator.next());%0A%09%09%09%7D%0A%09%09%7D catch (Throwable e) %7B%0A%09%09%09safeIterator.close();%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return list;%0A%09%7D%0A%7D%0A

add EsperUtil