private string ResolveUrl(IConnection connection, string connectionData)
        {
            string url;

            if (connection.MessageId == null)
            {
                url = UrlBuilder.BuildConnect(connection, Name, connectionData);
                connection.Trace(TraceLevels.Events, "LP Connect: {0}", url);
            }
            else if (IsReconnecting(connection))
            {
                url = UrlBuilder.BuildReconnect(connection, Name, connectionData);
                connection.Trace(TraceLevels.Events, "LP Reconnect: {0}", url);
            }
            else
            {
                url = UrlBuilder.BuildPoll(connection, Name, connectionData);
                connection.Trace(TraceLevels.Events, "LP Poll: {0}", url);
            }

            return(url);
        }