private void StartNodeControllerService() { try { nodeControllerHost = MonoscapeServiceHost.CreateHost(typeof(ApNodeControllerService)); var binding = MonoscapeServiceHost.GetBinding(); nodeControllerHost.AddServiceEndpoint(typeof(IApNodeControllerService), binding, Settings.NodeControllerServiceURL); nodeControllerHost.Open(); Console.WriteLine("Node Controller service started at: " + Settings.NodeControllerServiceURL); } catch (CommunicationException ex) { if (nodeControllerHost != null) nodeControllerHost.Abort(); throw new MonoscapeException("Could not start service host: ApNodeControllerService", ex); } catch (TimeoutException ex) { if (nodeControllerHost != null) nodeControllerHost.Abort(); throw new MonoscapeException("Could not start service host: ApNodeControllerService", ex); } catch (Exception) { if (nodeControllerHost != null) nodeControllerHost.Abort(); throw; } }
private void StartExternalSystemService() { try { externalSysHost = MonoscapeServiceHost.CreateHost(typeof(ExternalSystemService)); var binding = MonoscapeServiceHost.GetBinding(); externalSysHost.AddServiceEndpoint(typeof(IExternalSystemService), binding, Settings.ExternalSystemServiceURL); externalSysHost.Open(); Console.WriteLine("External system service started at: " + Settings.ExternalSystemServiceURL); } catch (CommunicationException ex) { if (externalSysHost != null) externalSysHost.Abort(); throw new MonoscapeException("Could not start service host: ExternalSystemService", ex); } catch (TimeoutException ex) { if (externalSysHost != null) externalSysHost.Abort(); throw new MonoscapeException("Could not start service host: ExternalSystemService", ex); } catch (Exception) { if (externalSysHost != null) externalSysHost.Abort(); throw; } }
private void StartApplicationGridService() { try { gridHost = MonoscapeServiceHost.CreateHost(typeof(NcApplicationGridService)); var binding = MonoscapeServiceHost.GetBinding(); gridHost.AddServiceEndpoint(typeof(INcApplicationGridService), binding, Settings.ApplicationGridServiceUrl); gridHost.Open(); Console.WriteLine("Application Grid service started at: " + Settings.ApplicationGridServiceUrl); } catch (CommunicationException ex) { if (gridHost != null) gridHost.Abort(); throw new MonoscapeException("Could not start service host: NcApplicationGridService", ex); } catch (TimeoutException ex) { if (gridHost != null) gridHost.Abort(); throw new MonoscapeException("Could not start service host: NcApplicationGridService", ex); } catch (Exception e) { if (gridHost != null) gridHost.Abort(); throw e; } }
private void StartDashboardService() { try { dashboardHost = MonoscapeServiceHost.CreateHost(typeof(CcDashboardService)); var binding = MonoscapeServiceHost.GetBinding(); dashboardHost.AddServiceEndpoint(typeof(ICcDashboardService), binding, Settings.DashboardServiceURL); dashboardHost.Open(); Console.WriteLine("Dashboard service started at: " + Settings.DashboardServiceURL); } catch (CommunicationException ex) { if (dashboardHost != null) dashboardHost.Abort(); throw new MonoscapeException("Could not start service host: CcDashboardService", ex); } catch (TimeoutException ex) { if (dashboardHost != null) dashboardHost.Abort(); throw new MonoscapeException("Could not start service host: CcDashboardService", ex); } catch (Exception) { if (dashboardHost != null) dashboardHost.Abort(); throw; } }