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

Examples of com.ngt.jopenmetaverse.shared.sim.events.EventTimer


  {
    if (Operational() && autoPruneEnabled && Client.network.getConnected())
    {
      if (cleanerTimer == null)
      {
        cleanerTimer = new EventTimer(new TimerTask()
        {
          @Override
          public void run() {
            cleanerTimer_Elapsed();
          }                   
View Full Code Here


  private void DelayedRequestSetAppearance()
  {
    if (RebakeScheduleTimer == null)
    {
      RebakeScheduleTimer = new EventTimer(new TimerTask()
      {
        @Override
        public void run() {
          RebakeScheduleTimerTick();
        }                   
View Full Code Here

    {
      //                // Instantiate master thread that manages the request pool
      //                downloadMaster = new Thread(DownloadThread);
      //                downloadMaster.Name = "TexturePipeline";
      //                downloadMaster.IsBackground = true;
      downloadMaster = new EventTimer(new TimerTask(){
        @Override
        public void run() {
          if(_Running)
            DownloadThread();           
        }
      });
    }

    _Running = true;

    eventObservers.put(PacketType.ImageData, new EventObserver<PacketReceivedEventArgs>()
        {
      @Override
      public void handleEvent(Observable o,PacketReceivedEventArgs arg) {
        try{ ImageDataHandler(o, arg);}
        catch(Exception e) {JLogger.warn(Utils.getExceptionStackTraceAsString(e));}
      }}
        );

    eventObservers.put(PacketType.ImagePacket, new EventObserver<PacketReceivedEventArgs>()
        {
      @Override
      public void handleEvent(Observable o,PacketReceivedEventArgs arg) {
        try{ ImagePacketHandler(o, arg);}
        catch(Exception e) {JLogger.warn(Utils.getExceptionStackTraceAsString(e));}
      }}
        );

    eventObservers.put(PacketType.ImageNotInDatabase, new EventObserver<PacketReceivedEventArgs>()
        {
      @Override
      public void handleEvent(Observable o,PacketReceivedEventArgs arg) {
        try{ ImageNotInDatabaseHandler(o, arg);}
        catch(Exception e) {JLogger.warn(Utils.getExceptionStackTraceAsString(e));}
      }}
        );

    for(Entry<PacketType, EventObserver<PacketReceivedEventArgs>> e : eventObservers.entrySet())
    {
      _Client.network.RegisterCallback(e.getKey(), e.getValue());
    }

    //            _Client.network.RegisterCallback(PacketType.ImageData, ImageDataHandler);
    //            _Client.network.RegisterCallback(PacketType.ImagePacket, ImagePacketHandler);
    //            _Client.network.RegisterCallback(PacketType.ImageNotInDatabase, ImageNotInDatabaseHandler);

    downloadMaster.schedule(500, 500);

    if (RefreshDownloadsTimer == null)
    {
      RefreshDownloadsTimer = new EventTimer(new TimerTask(){
        @Override
        public void run() {
          RefreshDownloadsTimer_Elapsed();
        }
      });
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.events.EventTimer

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.