Examples of UpdateScriptAgentRequestMessage


Examples of com.ngt.jopenmetaverse.shared.sim.message.LindenMessages.UpdateScriptAgentRequestMessage

      {
    URI url = Client.network.getCurrentSim().Caps.CapabilityURI("UpdateScriptAgent");

    if (url != null)
    {
      UpdateScriptAgentRequestMessage msg = new UpdateScriptAgentRequestMessage();
      msg.ItemID = itemID;
      msg.Target = mono ? "mono" : "lsl2";

      CapsHttpClient request = new CapsHttpClient(url);
      //        request.OnComplete += new CapsHttpClient.CompleteCallback(UpdateScriptAgentInventoryResponse);
      //        request.UserData = new object[2] { new Entry<ScriptUpdatedCallback, byte[]>(callback, data), itemID };
      request.addRequestCompleteObserver(new EventObserver<CapsHttpRequestCompletedArg>()
          {
        @Override
        public void handleEvent(Observable o,
            CapsHttpRequestCompletedArg arg) {
          try {
            UpdateScriptAgentInventoryResponse(arg.getClient(), arg.getResult(), arg.getError());
          } catch (URISyntaxException e) {
            JLogger.error(Utils.getExceptionStackTraceAsString(e));
          }
        }
          });
      //        request.OnComplete += UploadInventoryAssetResponse;
      request.setUserData(new Object[] {callback, data, itemID });
      //        request.setUserData(new Object[] { new Entry<EventObserver<ScriptUpdatedCallbackArg>, byte[]>(callback, data), itemID });
      request.BeginGetResponse(msg.Serialize(), OSDFormat.Xml, Client.settings.CAPS_TIMEOUT);
    }
    else
    {
      throw new Exception("UpdateScriptAgent capability is not currently available");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.