Example #1
0
#pragma warning disable RCS1168
        public DataFlowOpInitializeResult Initialize(DataFlowOpInitializateContext context)
#pragma warning restore RCS1168
        {
            if (!context.OutputPorts.IsEmpty())
            {
                throw new ArgumentException("EventBusSink operator does not provide an output stream");
            }

            var eventTypes = new EventType[context.InputPorts.Count];

            for (int i = 0; i < eventTypes.Length; i++)
            {
                eventTypes[i] = context.InputPorts.Get(i).TypeDesc.EventType;
            }
            _runtimeEventSender  = context.RuntimeEventSender;
            _eventAdapterService = context.StatementContext.EventAdapterService;

            if (collector != null)
            {
                _eventBusCollector = new EventBusCollectorImpl(
                    _eventAdapterService,
                    _runtimeEventSender);
            }
            else
            {
                _adapterFactories = new EventBeanAdapterFactory[eventTypes.Length];
                for (int i = 0; i < eventTypes.Length; i++)
                {
                    _adapterFactories[i] = context.ServicesContext.EventAdapterService.GetAdapterFactoryForType(eventTypes[i]);
                }
            }
            return(null);
        }
Example #2
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="runtimeEventSender">for processing events</param>
 /// <param name="mapEventType">the event type</param>
 /// <param name="threadingService">for inbound threading</param>
 /// <param name="eventAdapterService">for event bean creation</param>
 public EventSenderMap(EPRuntimeEventSender runtimeEventSender, MapEventType mapEventType,
                       EventAdapterService eventAdapterService, ThreadingService threadingService)
 {
     _runtimeEventSender  = runtimeEventSender;
     _mapEventType        = mapEventType;
     _threadingService    = threadingService;
     _eventAdapterService = eventAdapterService;
 }
Example #3
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="runtimeEventSender">for processing events</param>
 /// <param name="baseXMLEventType">the event type</param>
 /// <param name="eventAdapterService">for event bean creation</param>
 /// <param name="threadingService">for inbound threading</param>
 public EventSenderXMLDOM(EPRuntimeEventSender runtimeEventSender, BaseXMLEventType baseXMLEventType, EventAdapterService eventAdapterService, ThreadingService threadingService)
 {
     _runtimeEventSender  = runtimeEventSender;
     _baseXmlEventType    = baseXMLEventType;
     _validateRootElement = baseXMLEventType.ConfigurationEventTypeXMLDOM.IsEventSenderValidatesRoot;
     _eventAdapterService = eventAdapterService;
     _threadingService    = threadingService;
 }
Example #4
0
 /// <summary>Ctor. </summary>
 /// <param name="runtime">for processing events</param>
 /// <param name="beanEventType">the event type</param>
 /// <param name="eventAdapterService">factory for event beans and event types</param>
 /// <param name="threadingService">for inbound threading</param>
 public EventSenderBean(EPRuntimeEventSender runtime, BeanEventType beanEventType, EventAdapterService eventAdapterService, ThreadingService threadingService)
 {
     _iLock               = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     _runtime             = runtime;
     _beanEventType       = beanEventType;
     _eventAdapterService = eventAdapterService;
     _compatibleClasses   = new HashSet <Type>();
     _threadingService    = threadingService;
 }
 /// <summary>Ctor. </summary>
 /// <param name="runtimeEventSender">for processing events</param>
 /// <param name="objectArrayEventType">the event type</param>
 /// <param name="threadingService">for inbound threading</param>
 /// <param name="eventAdapterService">for event bean creation</param>
 public EventSenderObjectArray(EPRuntimeEventSender runtimeEventSender,
                               ObjectArrayEventType objectArrayEventType,
                               EventAdapterService eventAdapterService,
                               ThreadingService threadingService)
 {
     _runtimeEventSender   = runtimeEventSender;
     _objectArrayEventType = objectArrayEventType;
     _threadingService     = threadingService;
     _eventAdapterService  = eventAdapterService;
 }
Example #6
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="runtimeEventSender">for processing events</param>
 /// <param name="eventType">the event type</param>
 /// <param name="threadingService">for inbound threading</param>
 /// <param name="eventAdapterService">for event bean creation</param>
 public EventSenderAvro(
     EPRuntimeEventSender runtimeEventSender,
     EventType eventType,
     EventAdapterService eventAdapterService,
     ThreadingService threadingService)
 {
     _runtimeEventSender  = runtimeEventSender;
     _eventType           = eventType;
     _threadingService    = threadingService;
     _eventAdapterService = eventAdapterService;
 }
 public DataFlowOpInitializateContext(String dataflowName, String dataflowInstanceId, Object dataflowInstanceUserObject, IDictionary <int, DataFlowOpInputPort> inputPorts, IDictionary <int, DataFlowOpOutputPort> outputPorts, StatementContext statementContext, EPServicesContext servicesContext, AgentInstanceContext agentInstanceContext, EPRuntimeEventSender runtimeEventSender, EPServiceProvider engine, Attribute[] operatorAnnotations)
 {
     DataflowName               = dataflowName;
     DataflowInstanceId         = dataflowInstanceId;
     DataflowInstanceUserObject = dataflowInstanceUserObject;
     InputPorts           = inputPorts;
     OutputPorts          = outputPorts;
     StatementContext     = statementContext;
     ServicesContext      = servicesContext;
     AgentInstanceContext = agentInstanceContext;
     RuntimeEventSender   = runtimeEventSender;
     Engine = engine;
     OperatorAnnotations = operatorAnnotations;
 }
Example #8
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="runtime">for processing events</param>
 /// <param name="beanEventType">the event type</param>
 /// <param name="eventAdapterService">factory for event beans and event types</param>
 /// <param name="threadingService">for inbound threading</param>
 /// <param name="lockManager">The lock manager.</param>
 public EventSenderBean(
     EPRuntimeEventSender runtime,
     BeanEventType beanEventType,
     EventAdapterService eventAdapterService,
     ThreadingService threadingService,
     ILockManager lockManager)
 {
     _iLock               = lockManager.CreateLock(GetType());
     _runtime             = runtime;
     _beanEventType       = beanEventType;
     _eventAdapterService = eventAdapterService;
     _compatibleClasses   = new HashSet <Type>();
     _threadingService    = threadingService;
 }
 public EventSender GetSender(EPRuntimeEventSender runtimeEventSender)
 {
     return(new MyPlugInPropertiesEventSender(_eventType, runtimeEventSender));
 }
 public MyPlugInPropertiesEventSender(MyPlugInPropertiesEventType type, EPRuntimeEventSender runtimeSender)
 {
     _type          = type;
     _runtimeSender = runtimeSender;
 }
Example #11
0
 public EventSender GetSender(EPRuntimeEventSender runtimeEventSender)
 {
     return(GetSenderFunc(runtimeEventSender));
 }
Example #12
0
 public EventBusCollectorImpl(EventAdapterService eventAdapterService, EPRuntimeEventSender runtimeEventSender)
 {
     _eventAdapterService = eventAdapterService;
     _runtimeEventSender  = runtimeEventSender;
 }
Example #13
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="handlingFactories">list of factories</param>
 /// <param name="epRuntime">the runtime to use to process the event</param>
 /// <param name="threadingService">for inbound threading</param>
 public EventSenderImpl(List <EventSenderURIDesc> handlingFactories, EPRuntimeEventSender epRuntime, ThreadingService threadingService)
 {
     _handlingFactories = handlingFactories;
     _epRuntime         = epRuntime;
     _threadingService  = threadingService;
 }
Example #14
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="theEvent">inbound event, wrapped</param>
 /// <param name="runtime">to process</param>
 public InboundUnitSendWrapped(EventBean theEvent, EPRuntimeEventSender runtime)
 {
     _eventBean = theEvent;
     _runtime   = runtime;
 }