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

Examples of com.ngt.jopenmetaverse.shared.sim.events.AutoResetEvent.waitOne()


            if (e.getSimulator().equals(Client.network.getCurrentSim()))
              queueEvent.set();
          }
          };
          Client.network.RegisterOnEventQueueRunningCallback(queueCallback);
          queueEvent.waitOne(10 * 1000);
          Client.network.UnregisterOnEventQueueRunningCallback(queueCallback);                   
    }

    teleportStat = TeleportStatus.None;
    teleportEvent.reset();
View Full Code Here


           
          Client.assets.registerOnXferReceived(xferCallback);
           
          xferID[0] = Client.assets.RequestAssetXfer(fileName, true, false, UUID.Zero, AssetType.Unknown, true);
   
            if (gotMuteList.waitOne(60 * 1000))
            {
              muteList = Utils.bytesWithTrailingNullByteToString(assetData[0]);
   
              synchronized (MuteList.getDictionary())
              {
View Full Code Here

        itemList = (List<MapItem>)itemListArray[0];

        OnGridItems.addObserver(callback);
        RequestMapItems(regionHandle, item, layer);

        itemsEvent.waitOne(timeoutMS);

        OnGridItems.deleteObserver(callback);

        return itemList;
  }
View Full Code Here

            int t = 0;
            AutoResetEvent sleepEvent = new AutoResetEvent(false);
            while (WaitingForUploadConfirm && t < UPLOAD_CONFIRM_TIMEOUT)
            {
//                System.Threading.Thread.Sleep(SLEEP_INTERVAL);
                sleepEvent.waitOne(SLEEP_INTERVAL);
                t += SLEEP_INTERVAL;
            }

            if (t < UPLOAD_CONFIRM_TIMEOUT)
            {
View Full Code Here

                  boolean success;
                  try
                  {
                    UploadRequestResult uploadResult = RequestUpload(AssetType.Texture, textureData, true, transactionID);
                      success = uploadEvent.waitOne(Client.settings.TRANSFER_TIMEOUT);
                  }
                  catch (Exception e)
                  {
                    JLogger.warn(e);
                      success = false;
View Full Code Here

        fetchedItem = fetchedItemArray[0];

        onItemReceived.addObserver(callback);
        RequestFetchInventory(itemID, ownerID);

        fetchEvent.waitOne(timeoutMS);
        onItemReceived.deleteObserver(callback);

        return fetchedItem;
  }
View Full Code Here

      }};

      onFolderUpdated.addObserver(callback);

      RequestFolderContents(folder, owner, folders, items, order);
      if (fetchEvent.waitOne(timeoutMS))
        objects = _Store.GetContents(folder);

      onFolderUpdated.deleteObserver(callback);

      return objects;
View Full Code Here

        }
      }};
      onFindObjectByPathReply.addObserver(callback);

      RequestFindObjectByPath(baseFolder, inventoryOwner, path);
      findEvent.waitOne(timeoutMS);

      onFindObjectByPathReply.deleteObserver(callback);

      return foundItem[0];
View Full Code Here

        onTaskInventoryReply.addObserver(callback);

        RequestTaskInventory(objectLocalID);

        if (taskReplyEvent.waitOne(timeoutMS))
        {
          onTaskInventoryReply.deleteObserver(callback);

          if (!Utils.isNullOrEmpty(filename[0]))
          {
View Full Code Here

                Client.assets.registerOnXferReceived(xferCallback);

                // Start the actual asset xfer
                xferID[0] = Client.assets.RequestAssetXfer(filename[0], true, false, UUID.Zero, AssetType.Unknown, true);

                if (taskDownloadEvent.waitOne(timeoutMS))
                {
                  Client.assets.unregisterOnXferReceived(xferCallback);

                  String taskList = Utils.bytesWithTrailingNullByteToString(assetData[0]);
                  return ParseTaskInventory(taskList);
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.