Ejemplo n.º 1
0
        private void ProjectionsGet(HttpEntityManager http, UriTemplateMatch match, ProjectionMode?mode)
        {
            if (_httpForwarder.ForwardRequest(http))
            {
                return;
            }

            var envelope =
                new SendToHttpWithConversionEnvelope <ProjectionManagementMessage.Statistics, ProjectionsStatisticsHttpFormatted>(
                    _networkSendQueue, http, DefaultFormatter, OkNoCacheResponseConfigurator,
                    status => new ProjectionsStatisticsHttpFormatted(status, s => MakeUrl(match, s)),
                    ErrorsEnvelope(http));

            Publish(new ProjectionManagementMessage.GetStatistics(envelope, mode, null, true));
        }
Ejemplo n.º 2
0
        private void OnProjectionStatusGet(HttpEntityManager http, UriTemplateMatch match)
        {
            if (_httpForwarder.ForwardRequest(http))
            {
                return;
            }

            var envelope =
                new SendToHttpWithConversionEnvelope
                <ProjectionManagementMessage.Statistics, ProjectionStatisticsHttpFormatted>(
                    _networkSendQueue, http, DefaultFormatter, OkNoCacheResponseConfigurator,
                    status => new ProjectionStatisticsHttpFormatted(status.Projections[0], s => MakeUrl(http, s)),
                    ErrorsEnvelope(http));

            Publish(new ProjectionManagementMessage.Command.GetStatistics(envelope, null, match.BoundVariables["name"], true));
        }