/// <summary> /// matchMakerStateChanged is the event handler that takes care of detecting when the matchmaker /// gets removed from the data base. When this happens, there is no other option but to shutdown the /// platform /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void matchMakerStateChanged(object sender, LocalEndpointStateChangedEventArgs args) { AcdPlatform platform = _matchMaker._platform; AcdLogger logger = _matchMaker._logger; if (args.Reason == LocalEndpointStateTransitionReason.OwnerDisabledOrRemoved) { if (null != platform) { platform.BeginShutdown(ar => { platform.EndShutdown(ar); }, null); if (null != logger) { logger.Log("AcdAgentMatchMaker: Contact has been moved or removed, shutting down the application."); } } else { if (null != logger) { _matchMaker._logger.Log("AcdAgentMatchMaker: Contact has been moved or removed, but the platform is null. Cannot shut down the application."); } } } }
/// <summary> /// AcdAgentMatchMaker constructs the Automatic Call Distributor match maker /// </summary> internal AcdAgentMatchMaker(AcdPlatform platform, AcdAgentMatchMakerConfiguration configuration, ApplicationEndpointSettings endpointSettings, AcdLogger logger) { _platform = platform; _configuration = configuration; _logger = logger; _matchMakerState = MatchMakerState.Created; _pendingAgentRequestQueueItems = new List <PendingAgentMatchRequestQueueItem>(); endpointSettings.AutomaticPresencePublicationEnabled = true; endpointSettings.Presence.RemotePresenceSubscriptionCategories.Clear(); endpointSettings.Presence.RemotePresenceSubscriptionCategories.Add("state"); //Create the endpoint that will be used by the Agent match maker. _endpoint = new ApplicationEndpoint(platform.CollaborationPlatform, endpointSettings); }
public AcdPortal(AcdPlatform platform, AcdPortalConfiguration config, ApplicationEndpointSettings endpointSettings) { _acdPlatform = platform; _configuration = config; _uri = config.Uri; _sessions = new List <AcdCustomerSession>(); _logger = new AcdLogger(); endpointSettings.AutomaticPresencePublicationEnabled = true; endpointSettings.Presence.PreferredServiceCapabilities = null; endpointSettings.UseRegistration = true; endpointSettings.SupportedMimePartContentTypes = new List <ContentType>() { new ContentType("application/octet-stream") }; _endpoint = new ApplicationEndpoint(this.Platform.CollaborationPlatform, endpointSettings); _endpoint.InnerEndpoint.AddSipExtension("picav"); this.UpdatePortalState(PortalState.Created); }
internal ShutdownAsyncResult(AsyncCallback userCallBack, object state, AcdPlatform platform) : base(userCallBack, state) { _acdPlatform = platform; }
internal StartupAsyncResult(AsyncCallback userCallback, object state, string configXMLDoc, AcdPlatform platform) : base(userCallback, state) { _acdPlatform = platform; _configXMLDoc = configXMLDoc; }