Package net.alteiar.thread

Examples of net.alteiar.thread.MyRunnable


    notifyLocal(METH_REVALIDATE_FILTER_IMAGE_METHOD, oldValue, filterImage);
  }

  private void refreshFilterImageThread() {
    ThreadPoolUtils.getClientPool().execute(new MyRunnable() {
      @Override
      public void run() {
        while (refreshVision) {
          if (somethingChange) {
            somethingChange = false;
View Full Code Here


              + " est deja en cours d'envoie !!!");
    }
  }

  private void sendTCPMessage(final Connection conn, final IUniqueObject obj) {
    ThreadPoolUtils.getClientPool().execute(new MyRunnable() {
      @Override
      public void run() {
        while ((conn.getTcpWriteBufferSize() + getMaxChunkSize()) >= bufferSize) {
          try {
            Thread.sleep(10);
View Full Code Here

  private int getMaxChunkSize() {
    return factory.getChunkSize();
  }

  private void sendTCPMessage(final Connection conn, final Encaps send) {
    ThreadPoolUtils.getServerPool().execute(new MyRunnable() {
      @Override
      public void run() {
        IUniqueObject obj = send.getNextChunk();

        realSend(conn, obj);
View Full Code Here

   * Send a new document to the server and dispatch it to all players
   *
   * @param bean
   */
  public void createDocument(final BasicBean bean) {
    ThreadPoolUtils.getClientPool().execute(new MyRunnable() {
      @Override
      public void run() {
        addDocu.createDocument(bean);
      }

View Full Code Here

      }
    });
  }

  public void deleteDocument(final UniqueID uniqueId) {
    ThreadPoolUtils.getClientPool().execute(new MyRunnable() {
      @Override
      public void run() {
        generalDocu.closeDocument(uniqueId);
      }
View Full Code Here

  private int getMaxChunkSize() {
    return factory.getChunkSize();
  }

  private void sendTCPMessage(final Connection conn, final Encaps send) {
    ThreadPoolUtils.getServerPool().execute(new MyRunnable() {
      @Override
      public void run() {
        IUniqueObject obj = send.getNextChunk();

        realSend(conn, obj);
View Full Code Here

    traker.addPropertyChangeListener(CombatTraker.METH_ADD_UNIT_METHOD,
        new PropertyChangeListener() {
          @Override
          public void propertyChange(final PropertyChangeEvent evt) {
            Threads.execute(new MyRunnable() {
              @Override
              public void run() {
                addElement((UniqueID) evt.getNewValue());
              }

              @Override
              public String getTaskName() {
                return "Add unit";
              }
            });
          }
        });
    traker.addPropertyChangeListener(CombatTraker.METH_REMOVE_UNIT_METHOD,
        new PropertyChangeListener() {
          @Override
          public void propertyChange(final PropertyChangeEvent evt) {
            Threads.execute(new MyRunnable() {
              @Override
              public void run() {
                removeElement((UniqueID) evt.getNewValue());
              }
View Full Code Here

  public void propertyChange(PropertyChangeEvent evt) {
    if (MapBean.METH_ADD_ELEMENT_METHOD.equals(evt.getPropertyName())) {
      final UniqueID mapElementId = ((UniqueID) evt.getNewValue());
      addDrawable(new MapElementDrawable(mapElementId));
    } else if (MapBean.PROP_FILTER_PROPERTY.equals(evt.getPropertyName())) {
      Threads.execute(new MyRunnable() {
        @Override
        public void run() {
          filterChanged();
        }
View Full Code Here

      ExceptionTool.showError(e);
    }
  }

  public void initialize() {
    Threads.execute(new MyRunnable() {
      @Override
      public void run() {
        try {
          plugin.initialize();
        } catch (Exception ex) {
View Full Code Here

      return;
    }
    needRefreshAllDocs = false;
    isRefreshingAllDocs = true;

    Threads.execute(new MyRunnable() {
      @Override
      public void run() {
        DocumentNode root = (DocumentNode) fullModel.getRoot();
        fillCompleteModel(root);
View Full Code Here

TOP

Related Classes of net.alteiar.thread.MyRunnable

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.