예제 #1
0
        public void Query(Query query,
                          IMessagingListener listener,
                          string destinationId,
                          AdkQueryOptions queryOptions)
        {
            if (query == null)
            {
                AdkUtils._throw
                    (new ArgumentException("Query object cannot be null"), Agent.GetLog());
            }

            // Validate that the query object type and SIF Context are valid for this Topic
            if (query.ObjectType != fObjType)
            {
                AdkUtils._throw(new ArgumentException("Query object type: {" + query.ObjectTag +
                                                      "} does not match Topic object type: " + fObjType + "}"), log);
            }

            if (!query.SifContext.Equals(fContext))
            {
                AdkUtils._throw(new ArgumentException("Query SIF_Context: {" + query.SifContext +
                                                      "} does not match Topic SIF_Context: " + fContext + "}"), log);
            }

            _checkZones();

            AdkMessagingException err = null;

            //  Send the SIF_Request to each zone
            foreach (ZoneImpl z in fZones)
            {
                try
                {
                    z.Query(query, listener, destinationId, queryOptions);
                }
                catch (Exception th)
                {
                    if (err == null)
                    {
                        err =
                            new AdkMessagingException
                                ("Error querying topic \"" + fObjType + "\"", z);
                    }

                    if (th is AdkException)
                    {
                        err.Add(th);
                    }
                    else
                    {
                        err.Add(new AdkMessagingException(th.ToString(), z));
                    }
                }
            }

            if (err != null)
            {
                AdkUtils._throw(err, Agent.GetLog());
            }
        }
예제 #2
0
 string IZone.Query(Query query, AdkQueryOptions queryOptions)
 {
     // TODO:  Add TestZone.OpenADK.Library.IZone.Query implementation
     return(null);
 }
예제 #3
0
 public string Query(Query query, IMessagingListener listener, string destinationId,
                     AdkQueryOptions queryOptions)
 {
     // TODO:  Add TestZone.Query implementation
     return(null);
 }
예제 #4
0
 public void Query(Query query,
                   IMessagingListener listener,
                   AdkQueryOptions queryOptions)
 {
     Query(query, listener, null, queryOptions);
 }
예제 #5
0
 public void Query(Query query,
                   string destinationId,
                   AdkQueryOptions queryOptions)
 {
     Query(query, null, destinationId, queryOptions);
 }
예제 #6
0
 public void Query(Query query,
                   AdkQueryOptions queryOptions)
 {
     Query(query, null, null, queryOptions);
 }
예제 #7
0
        public void Query(Query query,
                                  IMessagingListener listener,
                                  string destinationId,
                                  AdkQueryOptions queryOptions)
        {
            if (query == null)
            {
                AdkUtils._throw
                    (new ArgumentException("Query object cannot be null"), Agent.GetLog());
            }

            // Validate that the query object type and SIF Context are valid for this Topic
            if (query.ObjectType != fObjType)
            {
                AdkUtils._throw(new ArgumentException("Query object type: {" + query.ObjectTag +
                        "} does not match Topic object type: " + fObjType + "}"), log);
            }

            if (!query.SifContext.Equals(fContext))
            {
                AdkUtils._throw(new ArgumentException("Query SIF_Context: {" + query.SifContext +
                        "} does not match Topic SIF_Context: " + fContext + "}"), log);
            }

            _checkZones();

            AdkMessagingException err = null;

            //  Send the SIF_Request to each zone
            foreach (ZoneImpl z in fZones)
            {
                try
                {
                    z.Query(query, listener, destinationId, queryOptions);
                }
                catch (Exception th)
                {
                    if (err == null)
                    {
                        err =
                            new AdkMessagingException
                                ("Error querying topic \"" + fObjType + "\"", z);
                    }

                    if (th is AdkException)
                    {
                        err.Add(th);
                    }
                    else
                    {
                        err.Add(new AdkMessagingException(th.ToString(), z));
                    }
                }
            }

            if (err != null)
            {
                AdkUtils._throw(err, Agent.GetLog());
            }
        }
예제 #8
0
 public void Query(Query query,
                           string destinationId,
                           AdkQueryOptions queryOptions)
 {
     Query(query, null, destinationId, queryOptions);
 }
예제 #9
0
 public void Query(Query query,
                           IMessagingListener listener,
                           AdkQueryOptions queryOptions)
 {
     Query(query, listener, null, queryOptions);
 }
예제 #10
0
 public void Query(Query query,
                           AdkQueryOptions queryOptions)
 {
     Query(query, null, null, queryOptions);
 }