Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the BrokerFrontendFactory class
        /// </summary>
        /// <param name="clientId">indicating the client id</param>
        /// <param name="binding">indicating the binding</param>
        /// <param name="info">indicating the session info</param>
        /// <param name="scheme">indicating the scheme</param>
        /// <param name="responseCallback">indicating the response callback</param>
        public WSBrokerFrontendFactory(string clientId, Binding binding, SessionInfo info, TransportScheme scheme, IResponseServiceCallback responseCallback)
            : base(clientId, responseCallback)
        {
            this.info             = info;
            this.schedulerOnAzure = SoaHelper.IsSchedulerOnAzure(this.info.BrokerLauncherEpr, this.info.UseInprocessBroker);
            this.schedulerOnIaaS  = SoaHelper.IsSchedulerOnIaaS(this.info.Headnode);

            this.binding = binding;
            this.scheme  = scheme;
            if (info.UseInprocessBroker)
            {
                this.brokerFrontend         = this.info.InprocessBrokerAdapter.GetBrokerFrontend(responseCallback);
                this.sendRequestClient      = new SendRequestAdapter(this.brokerFrontend);
                this.brokerControllerClient = this.brokerFrontend;
                this.responseServiceClient  = this.brokerFrontend;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the BrokerFrontendFactory class
        /// </summary>
        /// <param name="clientId">indicating the client id</param>
        /// <param name="binding">indicating the binding</param>
        /// <param name="info">indicating the session info</param>
        /// <param name="scheme">indicating the scheme</param>
        /// <param name="responseCallback">indicating the response callback</param>
        public HttpBrokerFrontendFactory(string clientId, Binding binding, SessionBase session, TransportScheme scheme, IResponseServiceCallback responseCallback) : base(clientId, responseCallback)
        {
            this.info    = session.Info as SessionInfo;
            this.binding = binding;
            this.scheme  = scheme;
            if (this.info.UseAzureStorage == true)
            {
                this.useAzureQueue   = true;
                this.azureQueueProxy = session.AzureQueueProxy;
            }

            if (this.info.UseInprocessBroker)
            {
                this.brokerFrontend         = this.info.InprocessBrokerAdapter.GetBrokerFrontend(responseCallback);
                this.sendRequestClient      = new SendRequestAdapter(this.brokerFrontend);
                this.brokerControllerClient = this.brokerFrontend;
                this.responseServiceClient  = this.brokerFrontend;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the SendRequestAdapter class
 /// </summary>
 /// <param name="frontend">indicating the broker frontend instance</param>
 public SendRequestAdapter(IBrokerFrontend frontend)
 {
     this.frontend = frontend;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Build frontend instance
 /// </summary>
 private void BuildFrontend()
 {
     this.frontend = this.brokerEntry.GetFrontendForInprocessBroker(this.callbackInstance);
 }