Package com.ngt.jopenmetaverse.shared.cap.http

Examples of com.ngt.jopenmetaverse.shared.cap.http.CapsHttpRequestCompletedArg


  public class LoginCompletedObserver extends  EventObserver<CapsHttpRequestCompletedArg>
  {
    public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
      //      System.out.println("RequestCompletedObserver called ...");
      CapsHttpRequestCompletedArg rcha = (CapsHttpRequestCompletedArg) arg1;
      OSD osd =  null;
      if(rcha.getError() == null)
      {
        osd = rcha.getResult();

      }
      LoginReplyLLSDHandler(rcha.getClient(), osd, rcha.getError());
   
View Full Code Here


    _SeedRequest = new CapsHttpClient(new URI(_SeedCapsURI));
    _SeedRequest.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
        {
      public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
        CapsHttpRequestCompletedArg obj1= (CapsHttpRequestCompletedArg) arg1;
        SeedRequestCompleteHandler(_SeedRequest, obj1.getResult(), obj1.getError());
      }
    });
    //              _SeedRequest.OnComplete += new CapsHttpClient.CompleteCallback(SeedRequestCompleteHandler);
    _SeedRequest.BeginGetResponse(req, OSDFormat.Xml, Simulator.Client.settings.CAPS_TIMEOUT);
  }
View Full Code Here

      CapsHttpClient request = new CapsHttpClient(url);
      request.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
          {
        public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
          //      System.out.println("RequestCompletedObserver called ...");
          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)
          {
View Full Code Here

      request.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
      {
        public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
          //      System.out.println("RequestCompletedObserver called ...");
          CapsHttpRequestCompletedArg rcha = (CapsHttpRequestCompletedArg) arg1;
          if (rcha.getError() != null)
          {
            JLogger.error("ObjectMediaNavigate: " + Utils.getExceptionStackTraceAsString(rcha.getError()));
          }
        }
      });

      request.BeginGetResponse(req.Serialize(), OSDFormat.Xml, Client.settings.CAPS_TIMEOUT);
View Full Code Here

      CapsHttpClient request = new CapsHttpClient(url);
      request.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
      {
        public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
          //      System.out.println("RequestCompletedObserver called ...");
          CapsHttpRequestCompletedArg rcha = (CapsHttpRequestCompletedArg) arg1;
          if (rcha.getError() != null)
          {
            JLogger.error("ObjectMediaUpdate: " + Utils.getExceptionStackTraceAsString(rcha.getError()));
          }
        }
      });

      request.BeginGetResponse(req.Serialize(), OSDFormat.Xml, Client.settings.CAPS_TIMEOUT);
View Full Code Here

      request.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
      {
        public void handleEvent(Observable arg0, CapsHttpRequestCompletedArg arg1) {
          //      System.out.println("RequestCompletedObserver called ...");
          CapsHttpRequestCompletedArg rcha = (CapsHttpRequestCompletedArg) arg1;
          if (rcha.getResult() == null)
          {
            JLogger.error("Failed retrieving ObjectMedia data");
            try { callback.execute( new ObjectMediaCallbackArgs(false, "", null)); }
            catch (Exception ex) { JLogger.error(Utils.getExceptionStackTraceAsString(ex)); }
            return;
          }

          LindenMessages.ObjectMediaMessage msg = new LindenMessages.ObjectMediaMessage();
          msg.Deserialize((OSDMap)rcha.getResult());

          if (msg.Request instanceof LindenMessages.ObjectMediaResponse)
          {
            LindenMessages.ObjectMediaResponse response = (LindenMessages.ObjectMediaResponse)msg.Request;
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.cap.http.CapsHttpRequestCompletedArg

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.