Package com.ngt.jopenmetaverse.shared.sim.events.am

Examples of com.ngt.jopenmetaverse.shared.sim.events.am.AttachmentResourcesCallbackArg


          CapsHttpRequestCompletedArg rcha = (CapsHttpRequestCompletedArg) arg1;
          try
          {
            if (rcha.getResult() == null || rcha.getError() != null)
            {
              callback.handleEvent(null, new AttachmentResourcesCallbackArg(false, null));
            }
            AttachmentResourcesMessage info = AttachmentResourcesMessage.FromOSD(rcha.getResult());
            callback.handleEvent(null, new AttachmentResourcesCallbackArg(true, info));

          }
          catch (Exception ex)
          {
            JLogger.error("Failed fetching AttachmentResources" + Utils.getExceptionStackTraceAsString(ex));
            callback.handleEvent(null, new AttachmentResourcesCallbackArg(false, null));
          }
        } 
          }
          );
      //      request.OnComplete += delegate(CapsHttpClient client, OSD result, Exception error)
      //          {
      //        try
      //        {
      //          if (result == null || error != null)
      //          {
      //            callback(false, null);
      //          }
      //          AttachmentResourcesMessage info = AttachmentResourcesMessage.FromOSD(result);
      //          callback(true, info);
      //
      //        }
      //        catch (Exception ex)
      //        {
      //          JLogger.error("Failed fetching AttachmentResources" + Utils.getExceptionStackTraceAsString(ex));
      //          callback(false, null);
      //        }
      //          };

      request.BeginGetResponse(Client.settings.CAPS_TIMEOUT);
    }
    catch (Exception ex)
    {
      JLogger.error("Failed fetching AttachmentResources" + Utils.getExceptionStackTraceAsString(ex));
      callback.handleEvent(null, new AttachmentResourcesCallbackArg(false, null));
    }
  }
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.events.am.AttachmentResourcesCallbackArg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.