public void Run() { try { runtime.ProcessWrappedEvent(eventBean); } catch (Exception e) { services.ExceptionHandlingService.HandleInboundPoolException(runtime.URI, e, eventBean); log.Error("Unexpected error processing wrapped event: " + e.Message, e); } }
public void SendEvent(object theEvent) { var eventBean = eventBeanTypedEventFactory.AdapterForTypedAvro(theEvent, eventType); if (threadingService.IsInboundThreading) { threadingService.SubmitInbound(eventBean, runtimeEventSender); } else { runtimeEventSender.ProcessWrappedEvent(eventBean); } }
public void Run() { try { var eventBean = services.EventTypeResolvingBeanFactory.AdapterForObjectArray(properties, eventTypeName); runtime.ProcessWrappedEvent(eventBean); } catch (Exception e) { services.ExceptionHandlingService.HandleInboundPoolException(runtime.URI, e, properties); log.Error("Unexpected error processing Object-array event: " + e.Message, e); } }
public void Run() { try { var eventBean = services.EventTypeResolvingBeanFactory.AdapterForXML(theEvent, eventTypeName); runtime.ProcessWrappedEvent(eventBean); } catch (Exception e) { services.ExceptionHandlingService.HandleInboundPoolException(runtime.URI, e, theEvent); Log.Error("Unexpected error processing Json event: " + e.Message, e); } }
public void SendEvent(object theEvent) { var underlying = GetUnderlying(theEvent); var eventBean = _eventBeanTypedEventFactory.AdapterForTypedJson(underlying, _eventType); if (_threadingService.IsInboundThreading) { _threadingService.SubmitInbound(eventBean, _runtimeEventSender); } else { _runtimeEventSender.ProcessWrappedEvent(eventBean); } }
public void SendEvent(object theEvent) { if (theEvent == null) { throw new ArgumentNullException(nameof(theEvent), "No event object provided to sendEvent method"); } var eventBean = GetEventBean(theEvent); // Process event if (_threadingService.IsInboundThreading) { _threadingService.SubmitInbound(eventBean, _runtime); } else { _runtime.ProcessWrappedEvent(eventBean); } }
public void SendEvent(object theEvent) { if (!theEvent.GetType().IsArray) { throw new EPException( "Unexpected event object of type " + theEvent.GetType().CleanName() + ", expected Object[]"); } var arr = (object[]) theEvent; EventBean objectArrayEvent = eventBeanTypedEventFactory.AdapterForTypedObjectArray(arr, objectArrayEventType); if (threadingService.IsInboundThreading) { threadingService.SubmitInbound(objectArrayEvent, runtimeEventSender); } else { runtimeEventSender.ProcessWrappedEvent(objectArrayEvent); } }
private void SendEvent( object node, bool isRoute) { XmlNode namedNode; if (node is XmlDocument) { namedNode = ((XmlDocument) node).DocumentElement; } else if (node is XmlElement) { namedNode = (XmlElement) node; } else { throw new EPException( "Unexpected event object type '" + node.GetType().CleanName() + "' encountered, please supply a XmlDocument or XmlElement node"); } if (validateRootElement) { var getNodeName = namedNode.Name; if (getNodeName != baseXMLEventType.RootElementName) { throw new EPException( "Unexpected root element name '" + getNodeName + "' encountered, expected a root element name of '" + baseXMLEventType.RootElementName + "'"); } } var theEvent = eventBeanTypedEventFactory.AdapterForTypedDOM(namedNode, baseXMLEventType); if (isRoute) { runtimeEventSender.RouteEventBean(theEvent); } else { if (threadingService.IsInboundThreading) { threadingService.SubmitInbound(theEvent, runtimeEventSender); } else { runtimeEventSender.ProcessWrappedEvent(theEvent); } } }
public void SendEvent(object theEvent) { if (!(theEvent is IDictionary<string, object>)) { throw new EPException( "Unexpected event object of type " + theEvent.GetType().CleanName() + ", expected " + typeof(IDictionary<string, object>).CleanName()); } var map = (IDictionary<string, object>) theEvent; EventBean mapEvent = eventBeanTypedEventFactory.AdapterForTypedMap(map, mapEventType); if (threadingService.IsInboundThreading) { threadingService.SubmitInbound(mapEvent, runtimeEventSender); } else { runtimeEventSender.ProcessWrappedEvent(mapEvent); } }