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

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


      AutoResetEvent textureDone = new AutoResetEvent(false);
      //Download the texture image
      Client.assets.RequestImage(textureIds[i], TextureDownloadCallback(result, textureDone));
      //wait for 1 min
      textureDone.waitOne(60 * 1000);
      if(result[0] != null)
      {
        //Decode the jpeg2000 image
        IOpenJPEG openJpeg = OpenJPEGFactory.getIntance();
        bitmaps[i] = openJpeg.DecodeToIBitMap(result[0].AssetData);
View Full Code Here


          gotMesh.set();               
          return null;
        }
          });
      mesh =  tmpMesh[0];
      gotMesh.waitOne(20 * 1000);
    }
    return mesh;
      }


View Full Code Here

      }
        };

        this.registerOnAgentWearablesReply(wearablesCallback);     
        RequestAgentWearables();
        boolean success = wearablesEvent.waitOne(WEARABLE_TIMEOUT);
        this.unregisterOnAgentWearablesReply(wearablesCallback);
        return success;
  }

  /// <summary>
View Full Code Here

        this.registerOnCachedBakesReply(cacheCallback);

        RequestCachedBakes();

        boolean success = cacheCheckEvent.waitOne(WEARABLE_TIMEOUT);
        this.unregisterOnCachedBakesReply(cacheCallback);

        return success;
  }
View Full Code Here

              // Fetch this wearable asset
              Client.assets.RequestAsset(wearable.AssetID, wearable.AssetType, true, assetReceivedCallback);


              if (!downloadEvent.waitOne(WEARABLE_TIMEOUT))
              {
                JLogger.error("Timed out downloading wearable asset " + wearable.AssetID + " (" + wearable.WearableType + ")");
                success.set(false);
              }
View Full Code Here

                return null;
              }};

              Client.assets.RequestImage(textureID, textureDownloadCallback);

              downloadEvent.waitOne(TEXTURE_TIMEOUT);
          }
          catch(Exception e)
          {
            JLogger.warn("Exception while running the task: \n" + Utils.getExceptionStackTraceAsString(e));
          }
View Full Code Here


    // FIXME: evalute the need for timeout here, RequestUploadBakedTexture() will
    // timout either on Client.Settings.TRANSFER_TIMEOUT or Client.Settings.CAPS_TIMEOUT
    // depending on which upload method is used.
    uploadEvent.waitOne(UPLOAD_TIMEOUT);
    JLogger.debug("Successfully Uploaded baked Texture got asset ID: " + bakeID[0]);
    return bakeID[0];
  }

  //TODO implement if necessary
View Full Code Here

          };

          OnGridRegion.addObserver(callback);

          RequestMapRegion(name, layer);
          regionEvent.waitOne(Client.settings.MAP_REQUEST_TIMEOUT);

          OnGridRegion.deleteObserver(callback);

          if (Regions.containsKey(name))
          {
View Full Code Here

    // Wait for a logout response. If the response is received, shutdown
    // will be fired in the callback. Otherwise we fire it manually with
    // a NetworkTimeout type
    try {
      if (!logoutEvent.waitOne(client.settings.LOGOUT_TIMEOUT))
        Shutdown(DisconnectType.NetworkTimeout);
    } catch (InterruptedException e) {
      JLogger.warn("Thread got interruped while waiting for logout event");
      Shutdown(DisconnectType.NetworkTimeout);
    }
View Full Code Here

              };
              Client.assets.RequestAsset(gestureID, AssetType.Gesture, true,
                  assetReceivedCallback);

              try {
                gotAsset.waitOne(30 * 1000);
              } catch (InterruptedException e1) {
                JLogger.error("Error while playing a gesture: " + Utils.getExceptionStackTraceAsString(e1));
              }

              if (gesture[0] != null && gesture[0].Decode())
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.