0
我正在運行一個使用Esper作爲我的核心CEP引擎的應用程序。 當我嘗試獲取之前在Esper運行時註冊的事件類型時,我得到一個UnsupportedOperationException。如何在運行時從Esper配置對象獲取eventType
esperConfiguration.addEventType(streamName, fieldNames, fieldTypes);
--------
//several lines later
--------
String[] propertyNames = esperConfiguration.getEventType(streamName).getPropertyNames();
我得到以下異常:
java.lang.UnsupportedOperationException: Obtaining an event type by name is only available at runtime
at com.espertech.esper.client.Configuration.getEventType(Configuration.java:905)
我無法理解爲什麼我的API調用不是「在運行時」,甚至當我在重複使用我用於初始化同一對象Esper引擎。