Exemplo n.º 1
0
        private void GetEvents(RequestEvents eventRequest)
        {
            lowestItemTracker.AddEntry(eventRequest.LastProcessedId, eventRequest.FeedId.Id);
            queuedItems.RemoveItemsWithIndexLowerThan(lowestItemTracker.GetLowestValue() + 1);

            LogTraceInfo($"Received event request for {eventRequest.EventsToSend} events with {eventRequest.LastProcessedId} last events from actor {Context.Sender.Path}");

            List <ItemEnvelope <AtomEntry> > eventEnvelope;

            if (eventRequest.LastProcessedId == 0)
            {
                eventEnvelope = queuedItems.Get(eventRequest.EventsToSend, eventRequest.EarliestEventsToSend);
            }
            else
            {
                eventEnvelope = queuedItems.Get(eventRequest.EventsToSend, eventRequest.LastProcessedId, eventRequest.FeedId);
            }

            if (eventEnvelope.Count > 0)
            {
                LogTraceInfo($"Returning events {string.Join(",", (from p in eventEnvelope select p.ItemToStore.Id).ToArray())} events with {eventRequest.LastProcessedId} last events from actor {Context.Sender.Path}");
            }

            RequestedEvents <AtomEntry> events = new RequestedEvents <AtomEntry>(eventEnvelope, queueAddress);

            Context.Sender.Tell(events, Context.Self);
        }
        public RequestEventInfo(HTTPRequest request, HTTPRequestStates newState)
        {
            this.SourceRequest = request;
            this.Event         = RequestEvents.StateChange;
            this.State         = newState;

            this.Progress   = this.ProgressLength = 0;
            this.Data       = null;
            this.DataLength = 0;
        }
        public RequestEventInfo(HTTPRequest request, byte[] data, int dataLength)
        {
            this.SourceRequest = request;
            this.Event         = RequestEvents.StreamingData;
            this.State         = HTTPRequestStates.Initial;

            this.Progress   = this.ProgressLength = 0;
            this.Data       = data;
            this.DataLength = dataLength;
        }
        public RequestEventInfo(HTTPRequest request, RequestEvents @event, long progress, long progressLength)
        {
            this.SourceRequest = request;
            this.Event         = @event;
            this.State         = HTTPRequestStates.Initial;

            this.Progress       = progress;
            this.ProgressLength = progressLength;
            this.Data           = null;
            this.DataLength     = 0;
        }
Exemplo n.º 5
0
    public CompositeDisposable                     Subscribe(RequestEvents <T> events)
    {
        var compositeDisposable = new CompositeDisposable();

        OnSuccess.Subscribe(x => events.SendSuccess(x));
        OnSuccessRaw.Subscribe(events.SendSuccessRaw);
        OnSerializationError.Subscribe(events.SendSerializationError);
        OnHttpError.Subscribe(events.SendHttpError);
        OnHttpErrorRaw.Subscribe(events.SendHttpErrorRaw);
        OnNetworkError.Subscribe(events.SendNetworkError);

        return(compositeDisposable);
    }
Exemplo n.º 6
0
        private void GetEvents(RequestEvents eventRequest)
        {
            lowestItemTracker.AddEntry(eventRequest.LastProcessedId, eventRequest.FeedId.Id);
            queuedItems.RemoveItemsWithIndexLowerThan(lowestItemTracker.GetLowestValue() + 1);

            LogTraceInfo($"Received event request for {eventRequest.EventsToSend} events with {eventRequest.LastProcessedId} last events from actor {Context.Sender.Path}");

            List<ItemEnvelope<AtomEntry>> eventEnvelope;

            if (eventRequest.LastProcessedId == 0)
                eventEnvelope = queuedItems.Get(eventRequest.EventsToSend, eventRequest.EarliestEventsToSend);
                else
                eventEnvelope = queuedItems.Get(eventRequest.EventsToSend, eventRequest.LastProcessedId, eventRequest.FeedId);

            if (eventEnvelope.Count > 0)
                LogTraceInfo($"Returning events {string.Join(",", (from p in eventEnvelope select p.ItemToStore.Id).ToArray())} events with {eventRequest.LastProcessedId} last events from actor {Context.Sender.Path}");

            RequestedEvents<AtomEntry> events = new RequestedEvents<AtomEntry>(eventEnvelope, queueAddress);
            Context.Sender.Tell(events, Context.Self);

        }
Exemplo n.º 7
0
 public void RemoveEventListener(RequestEvents type, HtmlEventHandler listener, bool capture)
 {
 }
Exemplo n.º 8
0
 public void RemoveEventListener(RequestEvents type, Action listener, bool capture)
 {
 }
Exemplo n.º 9
0
 public void RemoveEventListener(RequestEvents type, HtmlEventHandler listener)
 {
 }
Exemplo n.º 10
0
 public void AddEventListener(RequestEvents type, IEventListener listener, bool capture)
 {
 }
Exemplo n.º 11
0
 public void RemoveEventListener(RequestEvents type, Action listener)
 {
 }
Exemplo n.º 12
0
 public void AddEventListener(RequestEvents type, HtmlEventHandlerWithTarget<Request> listener)
 {
 }
Exemplo n.º 13
0
 public void RemoveEventListener(RequestEvents type, IEventListener listener)
 {
 }
Exemplo n.º 14
0
 public void RemoveEventListener(RequestEvents type, Action listener)
 {
 }
Exemplo n.º 15
0
 public void RemoveEventListener(RequestEvents type, IEventListener listener)
 {
 }
Exemplo n.º 16
0
 public void AddEventListener(RequestEvents type, HtmlEventHandler listener)
 {
 }
Exemplo n.º 17
0
 public void AddEventListener(RequestEvents type, HtmlEventHandler listener, bool capture)
 {
 }
Exemplo n.º 18
0
 public void AddEventListener(RequestEvents type, Action listener, bool capture)
 {
 }
Exemplo n.º 19
0
 public void AddEventListener(RequestEvents type, Action listener)
 {
 }
Exemplo n.º 20
0
 public void RemoveEventListener(RequestEvents type, IEventListener listener, bool capture)
 {
 }
Exemplo n.º 21
0
 public void RemoveEventListener(RequestEvents type, HtmlEventHandlerWithTarget <Request> listener)
 {
 }
Exemplo n.º 22
0
 public void AddEventListener(RequestEvents type, HtmlEventHandlerWithTarget <Request> listener, bool capture)
 {
 }
Exemplo n.º 23
0
 public void AddEventListener(RequestEvents type, IEventListener listener)
 {
 }
Exemplo n.º 24
0
 public void AddEventListener(RequestEvents type, IEventListener listener)
 {
 }
Exemplo n.º 25
0
 public void AddEventListener(RequestEvents type, Action listener)
 {
 }
Exemplo n.º 26
0
 public void RemoveEventListener(RequestEvents type, HtmlEventHandlerWithTarget<Request> listener, bool capture)
 {
 }