Exemple #1
0
        public override void AcceptRequest(RequestContext requestContext, Microsoft.Cis.Services.Nephos.Common.ServiceType serviceType)
        {
            requestContext.ServiceType = serviceType;
            PerRequestStorageManager perRequestStorageManager = new PerRequestStorageManager(TableServiceEntry.SharedStorageManager, requestContext.OperationStatus);
            AuthenticationManager    authenticationManager    = XFETableAuthenticationManager.CreateAuthenticationManager(TableServiceEntry.SharedStorageManager);
            AuthorizationManager     authorizationManager     = NephosAuthorizationManager.CreateAuthorizationManager(TableServiceEntry.SharedStorageManager, false);
            ITableManager            operationStatus          = TableManager.CreateTableManager(authorizationManager, TableServiceEntry.SharedTableDataFactory, TableServiceEntry.SharedStorageManager);

            operationStatus.Initialize();
            operationStatus.OperationStatus = requestContext.OperationStatus;
            IProcessor processor = TableProtocolHead.Create(requestContext, perRequestStorageManager, authenticationManager, operationStatus, TableProtocolHead.HttpProcessorConfigurationDefaultInstance, new TransformExceptionDelegate(SqlExceptionManager.TransformSqlException), null);

            ServiceRequestHandler.DispatchRequest(processor);
        }
Exemple #2
0
        public override void AcceptRequest(RequestContext context, Microsoft.Cis.Services.Nephos.Common.ServiceType serviceType)
        {
            Logger <IRestProtocolHeadLogger> .Instance.VerboseDebug.Log("Accepting request");

            context.ServiceType = serviceType;
            PerRequestStorageManager perRequestStorageManager = new PerRequestStorageManager(BlobServiceEntry.SharedStorageManager, context.OperationStatus);
            AuthenticationManager    operationStatus          = XFEBlobAuthenticationManager.CreateAuthenticationManager(perRequestStorageManager, false);

            operationStatus.OperationStatus = context.OperationStatus;
            AuthorizationManager authorizationManager = XFEBlobAuthorizationManager.CreateAuthorizationManager(perRequestStorageManager, true);

            authorizationManager.OperationStatus = context.OperationStatus;
            ServiceManager serviceManager = RealServiceManager.CreateServiceManager(authorizationManager, perRequestStorageManager, BlobServiceEntry.SharedConfig);

            serviceManager.OperationStatus = context.OperationStatus;
            IProcessor processor = HttpRestProcessor.Create(context, perRequestStorageManager, operationStatus, serviceManager, HttpRestProcessor.HttpProcessorConfigurationDefaultInstance, new TransformExceptionDelegate(SqlExceptionManager.TransformSqlException), null);
            bool       flag      = true;

            try
            {
                try
                {
                    processor.BeginProcess(new AsyncCallback(this.ProcessAsyncCallback), processor);
                    flag = false;
                }
                catch (NephosAssertionException nephosAssertionException1)
                {
                    NephosAssertionException nephosAssertionException = nephosAssertionException1;
                    IStringDataEventStream   error = Logger <IRestProtocolHeadLogger> .Instance.Error;
                    object[] str = new object[] { nephosAssertionException.ToString() };
                    error.Log("ASSERTION in BeginProcess: {0}", str);
                }
                catch (Exception exception1)
                {
                    Exception exception = exception1;
                    IStringDataEventStream unhandledException = Logger <IRestProtocolHeadLogger> .Instance.UnhandledException;
                    object[] objArray = new object[] { exception.ToString() };
                    unhandledException.Log("BeginProcess threw exception {0}", objArray);
                }
            }
            finally
            {
                if (flag)
                {
                    processor.Dispose();
                }
            }
            Logger <IRestProtocolHeadLogger> .Instance.VerboseDebug.Log("Returning from AcceptRequest method.");
        }
Exemple #3
0
 public abstract void AcceptRequest(RequestContext requestContext, Microsoft.Cis.Services.Nephos.Common.ServiceType serviceType);